Professional Documents
Culture Documents
NONLINEAR FINITE
ELEMENT ANALYSIS
FOR SOLIDS AND with
FLUIDS (UNEDITED MATLAB
1ST DRAFT)
AIRIL YASREEN MOHD YASSIN, MOHD
AL AKHBAR MOHD NOOR,ERWAN
HAFIZI KASIMAN, MOHD ZHAFRI
JAMIL
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS
FOR SOLIDS AND FLUIDS (unedited 1st draft)
2013
CONTENTS
CHAPTER 1
Finite Element Method or FEM can be both “everything” and “nothing”. At one end, FEM is
everything when it allows engineers to get information (i.e. stresses, displacement, forces)
of complex physical phenomenon for design purposes. At the other hand, FEM is nothing
because the information obtained is actually nothing but solution of partial differential
equation (PDE) or ordinary differential equations (ODE). In this context, FEM is nothing but
another numerical technique to solve PDE or ODE.
Realizing how FEM can be “everything’ is important because it can motivate its study but
realizing at the same time how FEM can be “nothing” guides the proper learning of FEM that
is, any discussion must begin from the first principle (i.e. PDE, ODE) if strong understanding
is desired.
Having said how FEM is just another numerical technique, indeed, there are various
numerical techniques available nowadays such as;
However, despite their variations, all the methods share similar concept that is;
“to covert the continuous nature of PDE (or ODE) into ‘equivalent’ simultaneous algebraic
equations”.
In elaborating the concept, we discuss herein the solution of the simplest forms of ODE that
is of a bar element. By leaving the derivation for later, the ODE of a bar element (as shown
in Figure 1.1) can be given as:
Domain equation
(1.1)
where u and q are the axial displacement of the bar and the external force acting on the bar,
respectively. and are the Young’s modulus and the cross-sectional area of the bar
respectively which both are constant for a linear problem. L is the length of the bar.
Complementing the domain ODE are the boundary conditions given as follows (which
detailed derivation and discussion are delayed until Chapter 2)
(1.2)
|
| (1.3)
The ODE is considered solved when a solution, is found which satisfies all the
equations above (i.e. Eqns. 1.1-1.3).
In fact, the exact (closed-formed) solution of the problem can already be obtained by direct
integration, thus;
(1.4)
( ) ( )
However, despite the availability of Eq. (1.4), the ODEs of the problem (Eqns. 1.1-1.3) are
still descritized numerically herein so as to demonstrate the basic concept of numerical
techniques. The problem is chosen due to its simplicity allowing for easy tracing of the
discussion.
To convert the ODEs (i.e. Eqns. 1.1-1.3) to its ‘equivalent’ simultaneous algebraic equations,
we start by assuming a guessed solution in the forms of polynomials. In our case we guess
(1.5)
Then, we satisfy Eqn. (1.3) by inserting Eqn. (1.5) into the equation to give;
| (1.6a)
which gives
(1.6b)
Next we satisfy Eqn. (1.2) by inserting Eqn. (1.5) into the equation to obtain
|
(1.7)
Finally, by inserting Eqn. (1.5) into Eqn. (1.1) the following is obtained.
(1.8)
Observing Eqn. (1.8), it must be noted that, whilst each of Eqns. (1.6-1.7) is an act of forcing
the equation to a certain values (i.e 0 and P, respectively) hence the “satisfaction” of the
equations, the insertion of the guess function (Eq. 1.5) into the domain equation (Eqn. 1.1)
is yet a satisfaction of the original equation hence the use of the inequality symbol ( ). As
we are going to see, the forcing of Eqn. (1.8) at several locations within the domain to a null
value is what satisfies the equation and what creates sufficient number of equations.
By grouping Eqns. (1.6 - 1.8) together, we can see that, so far, we have established three
simultaneous equations as follows
(1.9 a)
(1.9 b)
(1.9 c)
- We have five (5) unknown constant, a1, a2, a3, a4, and a5 but with only three (3)
simultaneous equations.
- The last equation that is Eqn. (1.9 c) (previously Eqn. (1.8)) is still not algebraic but
continuous in x. Also, the left hand side of the equation is not equal to the right hand
side because the guessed function is yet the solution of the ODE, as mentioned
previously.
So to get the sufficient number of equations (and to convert Eqn. (1.9 c) into algebraic) we
argue that, since Eqn. (1.9 c or 1.8) is obtained from domain equation, the equation must
hold (must be true) throughout the domain thus we can evaluate Eqn. (1.9 c) everywhere in
the domain as much as we need. In our case, to complement Eqn. (1.9 a) and Eqn. (1.9 b),
we evaluate Eqn. (1.9 c) at three (3) location in the bar says at x=L/3, L/2, 2L/3 to obtain
(1.10 a)
( ) ( )
(1.10 b)
( ) ( )
(1.10 c)
( ) ( )
Eqns. (1.10) are the results of forcing Eqn. (1.8) to a null value at several locations within the
domain as mentioned previously. Also, as can be seen, such an act not only represents the
satisfaction of the original ODE but also convert the ODE into a set of algebraic equations.
Now, by re-grouping Eqns. 1.9 (a – b) and Eqns. (1.10) we then have a sufficient number of
algebraic equations, given as;
(1.11 a)
(1.11 b)
(1.11 c)
( ) ( )
(1.11 d)
( ) ( )
(1.11 e)
( ) ( )
Eqns. (1.11) is thus the ‘equivalent’ simultaneous algebraic equations of the ODE of the
problem which are given originally as Eqn. (1.1 to 1.3). In other words, we can say that;
“Eqns. (1.11) are the ‘equivalent’ algebraic forms of Eqn. (1.1 - 1.3)”.
So this is basically the main concept shared by all numerical techniques such as FEM, FDM,
BEM and MESHFREE. But it is also the character of a numerical technique to treat the
equations in matrix forms as this what suits computer programming. In this context, Eqns.
(1.11) can be arranged in matrix forms as
( ) ( )
( ) ( ) (1.12)
{ } { }
( ) ( ) ]
[
or
[ ]{ } { } (1.13)
where
( ) ( )
[ ]
( ) ( )
( ) ( ) ]
[
{ }
{ }
{ }
{ }
By solving Eqn. (1.11) or (1.12), we would then obtain the numerical values of , , ,
and and by inserting these values into the original guessed function, Eqn. (1.5) we thus
obtain the numerical solution to the problem.
EXAMPLE 1.1
Let’s put what we have learned so far into practice. We are going to compare the result
obtained from Eqn. (1.12) with the closed-form solution of Eqn. (1.4) for the particular
problem below (Figure 1.2).
Figure 1.2 Cantilever bar with uniformly distributed load and a single point load
For this problem, the equation in the form of Eqn. (1.12) can be given as
E 1.1
[ ]{ }
{ }
By solving Eqn. (E1.1) using Matlab command “\”, (source code 1.1), the values of ai are thus
as given in Table 1.1
Value
And by inserting the values into Eqn. (1.5) we thus obtained the numerical solution of the
problem as
The accuracy of this numerical solution can be assessed by comparing its value with the
exact/closed-form solution which is obtained from Eqn. (1.4) as
( ) ( )
The plot of unumerical and uexact throughout the length, L of the bar and their respective values
at several locations are given in Fig. E1.1 and Table 1.1. Based on the plot and the table, it
can be concluded that the basic concept of the numerical technique able to provide similar
results hence solution as compared to the ones provided the closed-form solution.
However, it must be noted that this is generally not the case. Generally a numerical solution
would not be accurate but converge to the “accurate” solution with the increase in the
order of polynomial of the guessed functions (or degree of freedom and mesh density later
on).
In previous section, we have discussed the basic concept shared by all numerical techniques
that is, to convert the PDE or ODE of a problem into its equivalent algebraic equations.
Herein, we are going to focus our discussion on Finite Element Method (FEM). FEM is a
numerical method that widely used in engineering field of today. The theoretical argument
for FEM can be done in three different approaches which are;
i. Direct Method
ii. Variational Method
iii. Weighted Residual Method (WRM)
In our present discussion, our main interest is on WRM where we are going to leave the
discussion on Variational Method for later. Due to its simplicity, we are not going to discuss
Direct Method.
Actually, the specific form of WRM that is employed in present day FEM is known as
Galerkin WRM formulations. However, before we get into that, we are going to discuss first
the basic idea (or concept) of WRM, as given next.
The basic concept of WRM can be better argued by observing the evolution of the
discussion from the previous basic concept of numerical technique. We start by re-
observing Eqns. (1.1-1.3). Since we are going to discuss the basic concept of WRM by using
these equations as our starting point, we re-write the equations herein as
(1.14 a)
(1.14 b)
|
| (1.14 c)
The treatment on Eqn. (1.14a) is what differentiates WRM from other numerical techniques.
Whilst in previous discussion, Eqn. (1.14a) is evaluated at three different locations in the
domain (bar) so as to yield the necessary three algebraic equations. In WRM, we have quite
a different argument for this.
(1.15)
Residual error is a function emerges due to the fact that the guessed solution is not the
actual solution of the domain ODE. For the guessed solution of Eqn. (1.5), the residual error
function, R is as given by Eqn. (1.9c), re-given herein for easy viewing as
(1.16)
Plot of Eqn. (1.16) would give us the graphical view of the residual error function which a
typical plot is as shown in Figure 1.4.
Since this error function should not exist, integrating the function and setting it equal to
zero will also mean forcing the area beneath the curve to become zero, as shown in Figure
1.5.
Figure 1.5: Forcing of the area of the residual error function to zero
This action of forcing the area under the residual curve would give us one algebraic equation
in a similar way if we evaluate Eqn. (1.9c) at one location within the domain as previously
discussed. However, our present approach is more effective because the integration
somehow disperses the error in a more smooth and ‘overall’ manner.
But so far, this only gives us one equation, while the fact is, we need as much equations as
necessary. In previous discussion, we evaluate at three locations to provide the three
required algebraic equations, remember?
(1.17a)
(1.17b)
(1.17c)
where R1(x), R2(x), and R3(x) are the three ‘new’ residual error functions which all can be
typically plotted as in Figure 1.6
Figure 1.6: Plots of residual error functions, R1(x), R2(x), and R3(x)
Now by integrating separately each of the residual functions and setting it to zero, the
action would force the area under each curve to ‘disappear’ thus results in the three
required algebraic equations, given as
(1.18a)
∫ ∫
(1.18b)
∫ ∫
(1.18c)
∫ ∫
(1.19a)
(1.19b)
(1.19c)
Now, as we did previously, by grouping Eqns. (1.9a-1.9b) which actually the satisfaction of
Eqns (1.14b-c) and Eqns. (1.19a-b) together, we get:
(1.20a)
(1.20b)
(1.20c)
(1.20d)
(1.20e)
(1.21)
[ ]{ }
{ }
Equation (1.21) is the discretised equation of the bar ODE obtained from the basic WRM.
EXAMPLE 1.2
Let’s solve the previous problem of EXAMPLE 1.1 this time by employing WRM. We are
going to compare the result obtained from this approach with those obtained using basic
numerical technique given by Eqn. (E 1.1) and the closed-form solution of Eqn. (1.4).
For the given problem problem, the WRM discretised equation in the form of Eqn. (1.21)
can be given as
E 1.2
[ ]{ } { }
By solving Eqn. (E1.2) using Matlab command “\”, (source code 1.2), the values of ai are thus
as given in Table 1.3
Value
And by inserting the values into Eqn. (1.5) we thus obtained the numerical solution of the
problem as
The accuracy of WRM can be assessed by comparing its value with those previously
obtained in EXAMPLE 1.1. The plot of WRM results together with unumerical and uexact are
given in Figure 1.7 their numerical values at several locations along the bar are given in
Table 1.4.
Based on the plot and the table, it can be concluded that WRM gives similar results to
previous approaches hence validates its concepts. However, as mentioned previously, such
accurate result obtained herein is generally not the case. Generally, like any other numerical
techniques, WRM converges to the “accurate” solution with the increase in the order of
polynomial of the guessed functions (or degree of freedom and mesh density later on).
1.4 CLOSING
So far we have discussed about the basic concept shared by all numerical techniques. Then
we discussed about the basic concept of weighted residual method (WRM). However, it has
also been mentioned that the specific form of WRM employed in present day FEM is
Galerkin WRM. Since this is the actual discussion on FEM, we are going to discuss this in the
next chapter.
%--------------------------------------------------------------------------
% Declare symbol
%--------------------------------------------------------------------------
syms x
%--------------------------------------------------------------------------
% Input
%--------------------------------------------------------------------------
E=200e6; % Young's modulus (kN/m)
A=0.04; % Area (m^2)
L=5; % Length (m)
P=0; % Point Load (kN)
q=2; % Uniform load (kN/m)
%--------------------------------------------------------------------------
% Calculate matrix k and f for Ritz Method and wrm
%--------------------------------------------------------------------------
kz=[1 0 0 0 0;
0 E*A 2*E*A*L 3*E*A*L^2 4*E*A*L^3;
0 0 2*E*A 6*E*A*(L/3) 12*E*A*(L/3)^2;
© AIRIL YASREEN MOHD YASSIN, PhD, MOHD AL AKHBAR NOOR, MEng,
ERWAN HAFIZI KASIMAN, MEng, MOHD ZHAFRI JAMIIL, MEng Page 15
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS
FOR SOLIDS AND FLUIDS (unedited 1st draft)
2013
kwrm=[1 0 0 0 0;
0 E*A 2*E*A*L 3*E*A*L^2 4*E*A*L^3;
0 0 2*E*A*L 3*E*A*L^2 4*E*A*L^3;
0 0 E*A*L^2 2*E*A*L^3 3*E*A*L^4;
0 0 (2/3)*E*A*L^3 (3/2)*E*A*L^4 (12/5)*E*A*L^5]; % WRM
%--------------------------------------------------------------------------
% solve for unknown
%--------------------------------------------------------------------------
dz=kz\fz; % Ritz
dwrm=kwrm\fwrm; % WRM
% Ritz coeff.
az1=dz(1,1);
az2=dz(2,1);
az3=dz(3,1);
az4=dz(4,1);
az5=dz(5,1);
% WRM coeff.
aw1=dwrm(1,1);
aw2=dwrm(2,1);
aw3=dwrm(3,1);
aw4=dwrm(4,1);
aw5=dwrm(5,1);
%--------------------------------------------------------------------------
% Plot Result
%--------------------------------------------------------------------------
% Exact
Uexact=@(x)-q / E / A * x ^ 2 / 0.2e1 + (P + q * L) / E / A * x;
% Ritz
Unum=@(x) (az1+(az2*x)+(az3*x^2)+(az4*x^3)+(az5*x^4));
% WRM
Uwrm=@(x) (aw1+(aw2*x)+(aw3*x^2)+(aw4*x^3)+(aw5*x^4));
fplot(Uwrm,[0 L],'-*r')
hold on
fplot(Unum,[0 L],'-.sk')
hold on
fplot(Uexact,[0 L],'-ob')
hold on
xlabel('x');
ylabel('u (x) ');
legend('UWRM ','Unumeric','Uexact')
CHAPTER 2
2.1 INTRODUCTION
In the previous section, we have discussed the basic concept of numerical technique and the
basic concept of WRM. In this chapter we are going to discuss on the specific form of WRM
that is employed in present day FEM that is Galerkin WRM. However, since it has also been
mentioned that FEM is nothing but a numerical solution to PDE (or ODE), it is important in
any FEM endeavour, for the analyst to be familiar with the relevant PDE (and ODE) to
include its derivation and its closed-form solution (if available). This way, next time the
analyst is required to embark on a project or study, he or she is then trained to look at the
problem from the first principle and identify all the relevant aspects and concerns before he
or she employs FEM in getting the solution to the problem.
As mentioned, it is vital for an analyst to work into the problem from first principle and in
many cases; this would mean from the derivation of the relevant PDE (or ODE). Since in the
previous chapter, we have been introduced to the ODE of bar problem, herein we are going
to show the derivation of the ODE. Figure 2.1 shows a bar element and its differential
element.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 17
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
It can be argued that, although we have an axial force, F at the left side of the differential
element, due to the ‘disturbance’ along the differential length, dx (due to external load, for
example) the magnitude of the axial force at the right side of the differential element must
change. However we don’t know the exact change of this force, else we would not have this
problem in the first place would we? But by assuming the change is continuous, we can say
that the force at the right-side of the differential element can be represented by Taylor
series, as shown in Figure 2.1b).
But by assuming higher order terms as insignificant and since this is a 1D problem
(i.e. ( ) ( )), a state as shown in Figure 2.2c) is considered. This is an important
argument thus must be grasped by the readers because as we going to see later, the
derivation of PDE (or ODE) for other problems will be based on the same argument as well.
Having established the differential element and the corresponding forces acting on it, we
are in the position to derive the ODE for the bar problem. Since the bar only deform in axial
direction, only equilibrium in x-direction need to be considered thus;
(2.1)
By rearranging gives:
(2.2)
(2.3)
where σ is the axial stress, E is the Modulus Young and ε is the axial strain. Since
(2.4)
and
(2.5)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 18
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
By inserting Eqns. (2.7) into (2.2) would then give the ODE which we have previously
encountered in Chapter 1 (Eqn. (1.1)), that is
(2.8)
( )
For every ODE (or PDE for that matter), the domain equation/s must be accompanied by
boundary equations and for this particular case, the equations are given as below:
( ) (2.9a)
|
( )
| (2.9b)
| (2.9c)
| (2.9d)
Note that the sign convention for the natural (force) boundary conditions above is based on
the assumption that the boundary conditions are the reactions at support hence the
opposite directions to the internal forces.Since Eqn. (2.8) is a 2nd order ODE, two boundary
conditions out of the four given above must be known in prior so as to have a well-posed
problem.
Having established the bar ODE, we are now all set to discuss the basic concept of Galerkin
WRM. This is given next.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 19
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
2.2.1 FUNDAMENTAL OF GALERKIN WRM
We have discussed the basic concept of WRM that is, the integration of a function consists
of a product of the residual function and a weight function and forcing this integrated value
to zero in getting an algebraic function.
where and are the shape functions and and are the degree of freedoms (dofs).
We are going to discuss in detail on shape functions and degree of freedoms in the next sub-
section.
2. Galerkin WRM involves integration by part (IBP) which purposes are to:
i. reduce the order of the original derivative terms so as to relax the continuity requirement
ii. induce the natural (force) boundary conditions explicitly into the formulation
Point i) and ii) deserve further elaboration. For point i), as we going to see later, the IBP will
reduce the order of derivation of bar problem from to . Such a reduction would mean
that a guessed function, say a linear polynomial, ( ) once inserted into the former
would vanish but a constant if inserted into the latter. This is what we mean by “to relax the
continuity requirement”. Due to this, the final equation of Galerkin WRM is known as weak
statement because it has been “weakened” from the original PDE (or ODE). Accordingly, the
original form of the PDE (or ODE) is known as the strong statement of the problem.
For point ii), as we are going to see, the IBP will induce boundary terms which exactly in the
forms of Eqn. (1.2) (or Eqn. (1.14b)). Having these terms induced rather naturally, these
terms are called natural boundary conditions hence the interchangeable use of the term
with force boundary conditions. Due to this natural induction of the force (or natural)
boundary condition, we are not going to see the separate satisfaction of the force boundary
conditions as we saw previously in the basic WRM (i.e Eqn. (1.20b)).
3. Due to the use of dofs (hence the advantage of Galerkin WRM), we are also not going to
see the separate satisfaction of the displacement boundary conditions as previously seen in
Eqn. (1.20a). Instead, the displacement boundary conditions will be imposed only after the
complete establishment of the algebraic equation and prior to the solution of the equation.
Due to this, what is known as displacement is also interchangeably known as essential
boundary condition in Galerkin WRM and FEM for that matter.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 20
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Actually, there are two types of Galerkin WRM which difference depends on the type of
weight function. If the shape functions are used as the weight functions, the method is
called Bubnov–Galerkin but if other functions is used (for example, interpolation function as
in the basic WRM) the method is called Petrov–Galerkin. However, herein, our main interest
will be on the former, that is Bubnov–Galerkin method.
So the above is the description about Galerkin WRM (on how it differs from the basic WRM,
discussed previously in Chapter 1). Observing such an evolution is important as it can allow
for easier but deeper understanding of FEM.
Having established all these, we are now all set to discuss in detail the Galerkin WRM and
FEM for that matter and we are going to do this by solving the same bar ODE which we have
previously discussed in Chapter 1 and which derivation have been made earlier in this
chapter. To do this, we start by discussing the derivation of shape functions and the
definition of dofs for a bar problem. Before that, let’s note that Galerkin WRM is referred to
FEM from now on.
FEM bar element can be usually of two types; linear element and quadratic element. These
elements are shown in Figure 2.2; the former has two nodes and the latter has three nodes
per element.
Herein, we are going to derive the shape functions for both elements and we start by
assuming an interpolation function, ( ) in the forms of polynomial, thus
( ) (2.10a)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 21
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
b) For quadratic bar element
( ) (2.10b)
Despite the familiar use of polynomial functions, it is preferable to deal with a special set of
functions, known as shape functions, and a special sets of coefficient, known as degree
of freedoms (dof), . This means, Eqns. (2.10) must be equivalently expressed as:
( ) (2.11a)
( ) (2.11b)
( ) for (2.12a)
( ) for ,3 (2.12b)
Being referred as the degree of freedoms or dofs, , , and in Eqns. (2.11) (or in
Eqns. (2.12), are actually the nodal values of the axial displacement, ( ) These dofs are
graphically described in Figure 2.2.
The conversion from Eqns. (2.10) to Eqns. (2.11) or (2.12), hence the derivation of the shape
functions, can be done as follows.
i. Evaluate Eqn. (2.10a) at the location of the nodes (i.e. at both ends, ) and
equate them according to the dofs will give:
( )| ( )
(2.13a)
( )| ( )
(2.13b)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 22
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
iii. Inserting Eqn. (2.13b) into Eqn. (2.10a) and by factorizing give:
(2.13c)
( )
By comparing Eqn. (2.13c) and Eqn. (2.11a), it can be concluded that:
(2.13d)
Both and take the shapes as shown in Figure 2.3. Take note of the shapes as they will
be referred later in the discussion of integration by parts and the resulting boundary terms.
i. Evaluate Eqn. (2.10b) at the location of the nodes (i.e. at both ends,
) and equate them according to the dof give:
( )| ( ) ( )
( )| ( ) ( ) (2.14a)
( )| ( ) ( )
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 23
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
(2.14b)
iii. Inserting Eqn. (2.14b) into Eqn. (2.10b) and by factorizing give:
(2.14c)
( ) ( )( ) ( ) ( )
( )( )
( )
(2.14d)
( )
, and take the shapes as shown in Figure 2.4. Take note of the shapes as they will
be referred later in the discussion of integration by parts and the resulting boundary terms.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 24
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
2.2.3 DISCRETIZATION BY GALERKIN METHOD
Having established the shape functions and the degree of freedoms of the bar element, we
are all set to proceed with the discretization of the ODE.
For linear element, inserting Eqn. (2.13c) into Eqn. (2.8) gives:
( )
(2.15a)
whilst for quadratic element, inserting Eqn. (2.14c) into Eqn. (2.8) gives:
( ) (2.15b)
Take note that, from now on, we are going to deal frequently with the component forms as
this would eliminate the necessity to distinguish between linear and quadratic elements.
With this, it should also demonstrate the advantage of such notation system. The
component forms of Eqns. (2.15) is given as
( ) (2.16)
Since we have number of unknowns (because we want to determine the values of the
dofs, ) we thus need number of simultaneous equation. These required equations can be
obtained by multiplying Eqn. (2.16) subsequently with a set of weight functions. This act is
similar to the one conducted to Eqns. (1.17) during the discussion of the basic concept of
WRM.
Also, as mentioned earlier in this chapter, for Bubnov-Galerkin formulation, the weight
functions are also the shape functions. For example, for a linear bar element, the two
simultaneous equations can be obtained as follows:
( )
( )
(2.17a)
( )
( )
So, in component forms, the required simultaneous equations can be given as:
( )
( ) (2.17b)
The continuous nature of Eqns. (2.17) (since it is still in ODE forms) can be converted into
the equivalent algebraic forms by integrating over the length of the bar. This action is
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 25
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
referred to as ‘weighting the residual’; an action from which an approximate solution can be
obtained by forcing the residual to zero. The algebraic forms of Eq. (2.17b) are thus given as:
( )
∫ ( ) (2.18)
It can be seen that Eqn. (2.18) involves the integration of a product of functions, thus
integration by parts (IBP) can be employed. The reasons for employing the IBP, as
mentioned earlier in this chapter, are:
i. to reduce the continuity requirement since only first and lower derivatives will be dealt
with
ii. to induce (make explicit) the natural boundary conditions as boundary terms resulting
from the IBP
( )
∫ ( ) ∫ | (2.19)
In Eqn. (2.19) above, the dofs, are taken out from the integral sign because they are
constants thus do not involve in both differentiation and integration. The last terms on the
right hand side of Eq. (2.19), are called boundary terms resulting from the IBP.
( )
| | (2.20)
And further comparison with Eqns. (2.9a) and (2.9b), one can identify that Eqn. (2.20) is
actually the natural boundary conditions of the bar; hence it can be given that:
( )
| | | | (2.21)
Eqn. (2.21) deserves further explanation. The prevalence of the natural/force boundary
conditions, i.e. and within the equation depends on the accompanying value of the
shape functions, being evaluated at the location of the respective node i.e. | and
| . As can be seen, say from Figure 2.3 (linear element), the value of the shape
functions at the location can be given as:
at | |
(20)
at | |
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 26
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
As a result, for linear bar element, the boundary terms of Eqn. (2.21) can be specifically
given as:
| | ( ) ( )
(2.23)
| | ( ) ( )
But, for quadratic bar element, there is one particular feature worth of attention, that is, the
evaluated value of always null at the location of the edge nodes (refer Figure 2.4). By
taking this into consideration, the boundary terms of Eqn. (2.29) for a quadratic bar element
are thus given as:
| | ( ) ( )
(2.24)
| | ( ) ( )
| | ( ) ( )
Due to these various conditions and combination, it is common in the discussion of finite
element formulation to write Eqn. (2.19) simply as:
∫ ( ) ∫ (2.25)
where refers to boundary terms which can be nodal loads or reaction forces at support.
Eq. (2.25) completes the discretization of the bar’s ODE by Galerkin Method.
Now, let’s discuss the other term on the right hand side of Eqn. (2.25), that is ∫ .
Furthermore, let’s call this term as equivalent nodal loads and denote it as , thus:
∫ (2.26)
It is termed as equivalent nodal loads because these loads are the equivalent effects of a
load, that is acting on the domain; effects as perceived at the nodes. To better describe
such equivalence, let’s refer to Figure 2.5. As shown in the figure, the distributed loading,
( ) which is acting on the domain of the bar would deform the bar in the same manner as
if the bar is subjected to the two nodal loads (or three for quadratic bar) which values are
calculated by Eqn. (2.26).
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 27
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
∫ ( ) (2.27)
Eqn. (2.27) has been derived for one particular bar element, thus it is called local
equilibrium equation. For a more compact statement, Eqn. (2.27) is usually written in
component forms as:
(2.28)
where is termed as the local stiffness matrix of the bar element. and , on the other
hand, are the local vector of dofs and the load vector of the bar element, respectively. Thus,
the stiffness matrix and the load vector of the bar element can be given as:
∫ ( ) (2.29)
Alternatively, in matrix forms, the local equilibrium can also be represented as:
[ ]{ } { } (2.30)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 28
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
In an expanded matrix forms, the stiffness matrix of linear and quadratic elements can be
respectively given as:
(2.31a)
∫ ( ) ∫ ( )
[ ] [ ]
∫ ( ) ∫ ( )
[ ]
∫ ( )
[ ] [ ]
∫ ( ) (2.31b)
[ ]
Stiffness matrices which are given in Eqns. (2.31) are still in integral forms. Generally, to
carry out the integration, numerical integration is used due to the complexity. However,
since those in Eqns. (2.31) are simple, direct integration is used herein. The main purpose is
that, with direct (analytical) integration, the evolution of the procedure can easier be
followed since all variables remained to be seen. For demonstration purposes, the
integration of are shown below for both linear and quadratic elements. The fully
integrated stiffness matrix of both elements is then given.
(2.32a)
∫ ( )
∫ (( ) ( ))
(2.32b)
∫ ( )
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 29
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
∫ ( ) ( )
The fully (or analytically) integrated stiffness matrix for both elements can be given as:
(2.33a)
[ ] [ ]
[ ]
[ ]
(2.33b)
∫
{ } { } { }
∫
{ }
(2.34a)
for a specific case of uniform distributed load, it can be given that
{ } { }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 30
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
b) For quadratic bar element
{ } { } { } ∫
∫
{ } (2.34b)
for a specific case of uniform distributed load, it can be given that
{ }
{ }
Note that, Component forms and matrix forms will be used interchangeably in our
forthcoming discussion.
A body or a structure is meshed by many elements in a finite element analysis. The meshing
requires the assembly of local stiffness matrix, [ ] and local load vector, { } of individual
element to form the global stiffness matrix, [ ] and load vector, { }. Although in practice,
hundreds and thousands of elements might be assembled, herein, only the assembly of two
bar elements is demonstrated for easy tracing of the procedure. Figure 2.6 shows the two
assembled bar elements together with the local and global numbering of nodes and dof.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 31
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Based on the above, it is obvious that we need to have extra notation to distinguish
different elements. In doing this, we introduce the use of superscript as follows:
Having introduced the new superscript system, the local equilibrium for each element can
thus be given as:
[ ]{ } { } [ ]{ } { }
(2.35a)
Element 1 Element 2
[ ]{ } { } [ ]{ } { } (2.35b)
Element 1 Element 2
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 32
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Now the assembly of the elements can be done as follows.
[ ]{ } { }
[ ]{ } { }
[ ]{ } { }
[ ]{ } { }
(2.36b)
[ ]{ } { }
which can be simplified as
[ ]{ } { }
Based on Eqns. (2.36), it can be deduced that[ ], { } and { } are the global stiffness
matrix, global vector of dof and global load vector, respectively.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 33
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
2.2.6 IMPOSITION OF ESSENTIAL BOUNDARY CONDITIONS
The basic concept of the row-column condensation can be explained as follows. Assume
that we have a set of three simultaneous equations given as:
(2.37a)
Now, let’s assume that is known (the boundary conditions) i.e. ̅ . By inserting this
known value into Eqn. (2.37a) gives:
̅
̅ (2.37b)
Since ̅ is known, terms associated with it can be moved to the right hand side of Eq. (54b),
thus:
̅
̅ (2.37c)
By examining Eq. (54c), one can realize that we have two unknowns with three equations.
Since we need only two equations for the solution, we can just use say, the first and the
third equations. (We can also decide to use the second equation together with either first or
third equation), thus
̅
̅ (2.37d)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 34
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Now, the condensation can be made more obvious if we discuss the above in matrix forms.
Eqn. (2.37a) can be given in matrix forms as:
[ ]{ } { } (2.37e)
If ̅ is known, Eqn. (2.37e) can be condensed (thus the employment of the boundary
conditions) as follows:
̅
[ ]{ } { } (2.37f)
̅
The above explains the basic concept of row-column condensation where it can be
concluded that, an imposition of number of boundary conditions to a stiffness matrix of
size and to a load vector of , would condense the former to a size of
( ) ( ) and the latter to as size of ( ) . Once condensed, the solution
of the matrix system can proceed.
Now, let’s employ this method directly on our global equilibrium equation as given by Eqns.
(2.36). For the purpose of discussion, let’s assume that the right end of the bar is having a
specified displacement. Such a condition leads to the following essential boundary
conditions:
The imposition of the above boundary conditions to the global equilibrium equation can be
done as follows.
[ ]{ } { }
̅
̅
[ ]{ } { ̅}
(2.38a)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 35
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
b) For quadratic bar element
(2.38b)
[ ]{ ̅ } { }
̅
̅
̅
̅
[ ]{ } { } (2.38c)
Eqns. (2.38) are now ready to be solved. There are various ways to solve a matrix equation
such as direct inversion, Gauss Elimination, Cholesky Decomposition, etc. In the
accompanying MATLAB source codes, Gauss Elimination is adopted. Symbolically, the
solution of the matrix equation is represented as
{ } [ ] { } (2.39d)
EXAMPLE 2.1
Let’s solve the previous problem of EXAMPLE 1.1 this time by employing FEM. The problem
is solved by the assembly of two bar elements. Both linear and quadratic bars are
considered. The results are then verified against the closed-form solution of Eqn. (1.4).
Due to the symmetrically, element 1 and element 2 would have a similar local stiffness
matrix and load vector, thus,
[ ] (E2.1)
and
{ }
(E2.2a)
{ }
(E2.2b)
Note that is the local reaction at support of element 1 as can be seen in Figure 1.2.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 36
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
The assembled global stiffness matrix, [ ] is given as
[ ] [ ] (E2.3)
{ } { } { } (E2.4)
[ ]{ } { } (E2.5)
(E2.6)
[ ]{ } { }
By solving Eqn. (E2.6) using Matlab command “\”, (source code 2.1), the values of the
assembled global dof are thus obtained as:
{ } { } (E2.7a)
Eqn. (E2.7a) is the assembled global solution. By inserting these values accordingly into
Eqns. (2.30) the local forces can then be determined. However, before let’s determine first
the global reaction forces, which can be done by inserting Eqn. (E2.7a) into Eqn. (E2.5)
which yields
{ } [ ]{ } { } (E2.7b)
{ } { } (E2.7c)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 37
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Now, let’s proceed with determination of the local values. The elemental local solution for
each element is thus
{ } { } { } { }
(E2.8)
{ } { } { } { }
(E2.9)
Eqns. (E2.8) and (E2.9) are the elemental local solution.
Element 1
By inserting Eqn. (E2.8) into Eq. (2.30), the local force (or reaction if at support) can be
determined as follows.
{ } [ ]{ } { }
[ ]{ } { } (E2.10)
{ } { }
{ }
Element 2
By inserting Eqn. (E2.9) into Eq. (2.30), the local force (or reaction if at support) can be
determined as follows.
{ } [ ]{ } { }
[ ]{ } { }
(E2.11)
{ } { }
{ }
Linear bar
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 38
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
b) Quadratic bar element
Due to the symmetrically, element 1 and element 2 would have a similar local stiffness
matrix and load vector, thus,
(E2.12)
[ ]
and
{ } (E2.13a)
{ } (E2.13b)
Note that is the local reaction at support of element 1 as can be seen in Figure 1.2.The
assembled global stiffness matrix, [ ] is given as
(E2.14)
[ ]
[ ]
[ ]
{ } (E2.15)
{ } { }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 39
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
[ ]{ }
{ }
(E2.16)
[ ]{ } { } (E2.17)
By solving Eqn. (E2.17) using Matlab command “\”, (source code 2.2), the values of the
assembled global dof are thus obtained as:
(E2.18a)
{ }
{ }
Eqn. (E2.18a) is the assembled global solution. By inserting these values accordingly into
Eqns. (2.30) the local forces can then be determined. However, before let’s determine first
the global reaction forces, which can be done by inserting Eqn. (E2.18a) into Eqn. (E2.16)
which yields
{ } [ ]{ }
{ }
(E2.18b)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 40
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
The global reaction force can thus be given as
{ } { } (E2.18c)
Now, let’s proceed with determination of the local values. The elemental local solution for
each element is thus
{ } { } { } { } (E2.19)
{ } { } { } { } (E2.20)
Element 1
By inserting Eqn. (E2.19) into Eq. (2.30), the local force (or reaction if at support) can be
determined as follows.
{ } [ ]{ } { }
[ ]{ } { } (E2.21)
{ } { }
{ }
Element 2
By inserting Eqn. (E2.20) into Eq. (2.30), the local force (or reaction if at support) can be
determined as follows.
{ } [ ]{ } { }
[ ]{ } { } (E2.22)
{ } { }
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 41
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
Table 2.2: Values of quadratic bar global degree of freedom, { },
Quadratic bar
The validity of both results thus formulation can be assessed by comparing their values with
those previously obtained in EXAMPLE 1.1. The plot of FEM results against the closed-form
solution (Eqn. (1.4) are shown in Figure 2.7 which numerical values at several locations
along the bar are given in Table 2.3.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 42
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
the “accurate” solution with the increase in the order of polynomial of the guessed functions
(or degree of freedom and mesh density later on)” which was stated in previous chapter.
%Input
E=200e6; % Young's modulus (kN/m)
A=0.04; % Area (m^2)
L1=2.5; % Length 1st Element (m)
L2=2.5; % Length 1st Element (m)
P=10; % Point Load (kN)
q=2; % Uniform load (kN/m)
klocal2=[(A*E)/L2 -(A*E)/L2;
-(A*E)/L2 (A*E)/L2];
flocal1=[q*L1/2;q*L1/2];
flocal2=[q*L2/2;q*L2/2];
%Assemble
Kglobal=zeros(3,3);
Kglobal(1:2,1:2)=Kglobal(1:2,1:2)+klocal1;
Kglobal(2:3,2:3)=Kglobal(2:3,2:3)+klocal2;
Fglobal=zeros(3,1);
Fglobal(1:2,1)=Fglobal(1:2,1)+flocal1;
Fglobal(2:3,1)=Fglobal(2:3,1)+flocal2;
FG=Fglobal;
Fglobal(3,1) =Fglobal(3,1)+P; % Point Load
KG=Kglobal;
%Impose BC
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Fglobal(1,:)=[];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 43
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
% Reacttion
UU=[0;U(1,1);U(2,1)];
R=KG*UU-FG
%--------------------------------------------------------------------------
% Plot Result
%--------------------------------------------------------------------------
L=5;
Uexact=@(x) -q / E / A * x ^ 2 / 0.2e1 + (P + q * L) / E / A * x;
FEM2Nodex=[0;2.5;5];
FEM2Nodey=[0;U(1,1);U(2,1)];
plot(FEM2Nodex,FEM2Nodey,'--sk')
hold on
fplot(Uexact,[0 L],'-.*b')
hold on
xlabel('x');
ylabel('u (x) ');
legend('Ulinear ','Uexact')
%Input
E=200e6; % Young's modulus (kN/m)
A=0.04; % Area (m^2)
L1=2.5; % Length 1st Element (m)
L2=2.5; % Length 1st Element (m)
P=10; % Point Load (kN)
q=2; % Uniform load (kN/m)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 44
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SKELETON STRUCTURES
flocal1=[q*L1/6;2*q*L1/3;q*L1/6];
flocal2=[q*L2/6;2*q*L2/3;q*L2/6];
%Assemble
Kglobal=zeros(5,5);
Kglobal(1:3,1:3)=Kglobal(1:3,1:3)+klocal1;
Kglobal(3:5,3:5)=Kglobal(3:5,3:5)+klocal2;
KG=Kglobal;
Fglobal=zeros(5,1);
Fglobal(1:3,1)=Fglobal(1:3,1)+flocal1;
Fglobal(3:5,1)=Fglobal(3:5,1)+flocal2;
FG=Fglobal;
Fglobal(5,1) =Fglobal(5,1)+P; % Point Load
%Impose BC
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Fglobal(1,:)=[];
% Reaction
UU=[0;U(1,1);U(2,1);U(3,1);U(4,1)];
R=KG*UU-FG
%--------------------------------------------------------------------------
% Plot Result
%--------------------------------------------------------------------------
L=5;
Uexact=@(x) -q / E / A * x ^ 2 / 0.2e1 + (P + q * L) / E / A * x;
FEM3Nodex=[0;1.25;2.5;3.75;5];
FEM3Nodey=[0;U(1,1);U(2,1);U(3,1);U(4,1);];
plot(FEM3Nodex,FEM3Nodey,'-or')
hold on
fplot(Uexact,[0 L],'-.*b')
hold on
xlabel('x');
ylabel('u (x) ');
legend('FEM-Quadratic','Uexact')
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 45
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
CHAPTER 3
3.1 INTRODUCTION
In the previous chapter, we have discussed the concept of Galerkin WRM hence FEM and
formulated the discretised equation for bar element. Herein, we are going to continue our
discussion by formulating the discretised equation for beam problem. We begin by deriving
the Euler-Bernoulli differential equation of beam which is given next.
An Euler-Bernoulli beam is a structural member that resists loads by bending and shearing.
The corresponding deformation would be rotation and translation. The differential equation
for such a beam can be derived for static loading by considering its differential element as
shown in Figure 3.1. Also shown is the typical arrangement of a beam structure.
As argued previously for bar element (Chapter 2), although we have moment force, M and
shear force, V at the left side of the differential element, due to the ‘disturbance’ along the
differential length, dx (due to external load, for example) the magnitude of these forces at
the right side of the differential element must change. However we don’t know the exact
change of these forces, else we would not have the problem in the first place would we? But
by assuming the change is continuous, we can say that the forces at the right-side of the
differential element can be represented by a Taylor series, as shown in Figure 3.1b).
By assuming higher order terms as insignificant and since this is a 1D problem (i.e. ( )
( )), a state as shown in Figure 3.1c) is considered. This is an important argument thus
must be grasped by the readers because as we are going to see later, the derivation of PDE
(or ODE) for other problems will be based on the same argument as well.
Having established the differential element and the corresponding forces acting on it, we
are in the position to derive the ODE for beam bar problem. However, it must be noted
again that the following differential equation does not consider axial deformation thus the
absent of axial forces. Beams allowing such forces are called beam-column which FEM
formulation is given in the next chapter. Also, present formulation assumes slope is equalled
to rotation. A more general formulation would be the Timoshenko’ beam theory as it allows
different values for the two entities.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 46
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
∑ (3.1)
∑ (3.2)
∑ (3.3)
which yield
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 47
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
( ) (3.4)
( ) (3.5)
( )
where
(3.6)
(3.7)
( )
To arrive at Eqn. (3.7), higher order term has been assumed as insignificant thus
omitted. By differentiating Eqn. (3.7) once then inserting it into Eqn. (3.6) gives
(3.8)
Eqn. (3.8) is the differential equation of the beam in terms of moment force. But since our
FEM discussion focuses on displacement-based formulation, we need to express the ODE in
terms of displacement. This can be done by employing the constitutive equation which
relates the curvature of the beam with the moment force given as
(3.9)
where is the Young’s modulus of the material and is the second moment of area of the
beam’s cross-section. Together, they are known as the flexural stiffness of the beam, .
By differentiating Eqn. (3.9) twice and inserting into Eqn. (3.8), we obtain
(3.10)
Eqn. (3.10) is the ODE of the beam in terms of displacement variable as required. Like any
other differential equations, Eqn. (3.10) must be complemented by boundary condition
equations. There are two types of boundary conditions; force (natural) and displacement
(essential).
The force (natural) boundary conditions of the beam can be a single or a combination of the
following;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 48
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(3.11)
( )|
(3.12)
( )|
(3.13)
( )|
(3.14)
( )|
where , are the specified end shear forces (edge transverse point loads) and ,
are the specified end moment forces. Note that the sign convention above is based on the
assumption that the boundary conditions are the reactions at support hence the opposite
directions to the internal forces.
On the other hand, the displacement (essential) boundary conditions of the beam can be a
single or a combination of the following;
(3.15)
( )|
(3.16)
( )|
( )| (3.17)
( )| (3.18)
where , are the specified end rotations and , are the specified end transverse
displacements.
Since the beam ODE is of 4th order respectively, four boundary conditions out of the six
given above (Eqns. (3.11) to (3.18)) must be known in prior so as to have a well-posed
problem.
Having established the beam ODE, we are now all set to discuss its discretization by FEM.
We begin with the derivation the shape functions and the beam’s degree of freedoms.
Figure 3.2 shows a beam element with two end nodes. At each node, two degree of
freedoms are introduced; a translational dof and a rotational dof.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 49
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
We start the derivation of the shape function by assuming an interpolation function for the
transverse displacement, ( ) of the beam in the forms of polynomial. Thus;
( ) (3.19)
( ) (3.20)
( ) for (3.21)
Being referred as the degree of freedoms, , , and in Eqs. (3.20) (or in Eqs.
(3.21), are actually the nodal values of the transverse displacement, ( ) as graphically
described in Figure 3.2.
The conversion from Eqn. (3.19) into Eqn. (3.20), hence the derivation of the shape
functions, can be done as follows.
i) Evaluate Eq. (3.19) and its first derivative at the location of the nodes (i.e. at both
ends, ) and equate them to the dof to give:
( )|
( )
|
(3.22)
( )|
( )
|
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 50
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(3.23)
iii) Inserting Eqn. (3.23) into Eqn. (3.19) and by factorizing give:
( ) ( ) ( ) ( ) (3.24)
( )
( )
(3.25)
( )
( )
( )
The shape functions above are known as Hermite shape functions and they take the shapes
as shown in Figure 3.3. Take note of the shapes as they will be referred later in the
discussion of integration by parts and the resulting boundary terms.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 51
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Having established the shape functions and the degree of freedoms of the beam element,
we are all set to proceed with the discretization of the ODE.
( )
(3.26)
Take note that, from now on, we are going to deal with the component forms as this would
eliminate the need to write (hence to read) long statement, thus Eqn. (3.26) can be given in
component forms as
( ) (3.27)
Since we have j number of unknowns (because we want to determine the values of the dofs,
) we thus need j number of simultaneous equation. In our present discussion, so we
require four simultaneous equations. These required equations can be obtained by
multiplying Eqn. (3.27) subsequently with a set of weight functions. As mentioned, since our
discussion focuses on Bubnov-Galerkin formulation, the weight functions are also the shape
functions, thus
( )
( )
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 52
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
( ) (3.28)
( )
( )
( )
( )
( )
By observing Eqn. (3.28) it can be deduced that, in component forms, the required
simultaneous equations can be given as:
( )
( ) (3.29)
The continuous nature of Eqns. (3.29) (since it is still in ODE forms) can be converted into
the equivalent algebraic forms by integrating over the length of the beam. This action is
referred to as ‘weighting the residual’; an action from which an approximate solution can be
obtained by forcing the residual to zero. The algebraic forms of Eq. (3.29) are thus given as:
( )
∫ ( ) (3.30)
It can be seen that Eqn. (3.30) involves the integration of an inner product of functions, thus
integration by parts (IBP) can be employed. The reasons for employing the IBP, as
mentioned earlier in this chapter, are:
i. to reduce the continuity requirement since only second order derivatives will be dealt with
ii. to induce (make explicit) the natural boundary conditions as boundary terms resulting
from the IBP
( )
∫ ( ) ∫ | (3.31)
In Eqn. (3.31) above, the dofs, is taken out from the integral sign because it represents
constants thus does not involve in both differentiation and integration. The last terms on
the right hand side of Eq. (3.31), are called boundary terms resulting from the first IBP. A
careful examination reveals that this boundary terms are also the force (natural) boundary
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 53
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
conditions given by Eqns. (3.11) and (3.12), which specially related to end shear force.
Inserting these equations into Eqn. (3.31) modifies the latter into
∫ ( ) ∫ ( | | ) (3.32)
Next, we conduct IBP one more time on Eqn. (3.32). But why we want to do this? The
reasons are:
i. we want to optimize the continuity relaxation and since the order of derivatives between
the terms in the right hand side integral is still “unbalanced”(i.e. ), we have the
choice to balance them by another IBP
ii. Another IBP, as we are going to see, would induce another type of force (natural)
boundary conditions of the beam which are the end moments.
∫ ( ) (3.33)
( )
∫ ( | | ) |
The last terms on the right hand side of Eq. (3.33), are called boundary terms resulting from
the second IBP. A careful examination reveals that this boundary terms are also the force
(natural) boundary conditions given by Eqns. (3.13) and (3.14), which specially related to
end moment forces. Inserting these equations into Eqn. (3.33) modifies the latter into
∫ ( ) (3.34)
∫ ( | | )
( | | )
Eqn. (3.34) is the final weak statement of the beam problem but the last two terms on the
right hand side of the equation deserves further explanation. The prevalence of the
natural/force boundary conditions (whether they remain within the equation or not)
depends on the accompanying value of the shape functions when evaluated at the location
of the respective node i.e. | | | and | . As can be seen in Figure 3.3
the value of the shape functions and its derivatives at the node’s location can be given as:
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 54
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
at
| | | |
| | | |
(3.35)
At
| | | |
| | | |
Based on the above characteristic of shape functions, we can observe what remains on the
right side of Eqn. (3.34) say for ,
∫ ( ) (3.36)
∫ ( | | )
( | | )
∫ ( ) ∫ ( ) ( ) (3.37)
∫ ( ) ∫ (3.38)
By observing the evolution of discussion for other values of , the general formulation in the
forms of Eqn. (3.38) can thus be given as
∫ ( ) ∫ (3.39)
where refers to boundary terms or nodal loads. Eqn. (3.39) completes the discretization
of the beam’s ODE by Galerkin Method.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 55
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Now, let’s discuss the other term on the right hand side of Eqn. (3.39), that is ∫ .
Furthermore, let’s call this term as equivalent nodal loads and denote it as , thus:
∫ (3.40)
It is termed as equivalent nodal loads because these loads are the equivalent effects of a
load, that is acting on the domain; effects as perceived at the nodes. To better describe
such equivalence, let’s refer to Figure 3.4. As shown in the figure, the distributed loading,
( ) which is acting on the domain of the beam would deform the bar in the same manner
as if the beam is subjected to the four nodal loads which values are calculated by Eqn.
(3.40).
∫ ( ) (3.41)
Eqn. (3.41) has been derived for one particular bar element, thus it is called local
equilibrium equation. For a more compact statement, Eqn. (3.41) is usually written in
component forms as:
(3.42)
where is termed as the local stiffness matrix of the beam element. and , on the
other hand, are the local vector of dofs and the load vector of the beam element,
respectively. Thus, the stiffness matrix and the load vector of the beam element can be
given as:
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 56
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
∫ ( ) (3.43)
Alternatively, in matrix forms, the local equilibrium can also be represented as:
[ ]{ } { } (3.44)
In an expanded matrix forms, the stiffness matrix of a beam element can be respectively
given as:
∫ ( )
(3.45)
[ ] [ ]
∫ ( )
[ ]
The stiffness matrix which is given by Eqn. (3.45) is still in integral forms. Generally, to carry
out the integration, numerical integration is used due to the complexity. However, since
Eqns. (3.45) are simple, direct integration is used herein. The main purpose is that, with
direct (analytical) integration, the evolution of the procedure can easier be followed since all
variables remained to be seen. For demonstration purposes, the integration of and
are shown below.
∫ ( )
∫ ( ) ( )
(3.46a)
∫ ( )
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 57
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
∫ ( ) ( )
(3.46b)
The fully integrated stiffness matrix of the beam element is then given as;
(3.47)
[ ]
[ ]
∫
(3.48a)
∫
{ } { } { }
∫
∫
{ }
It is worth to note again that component forms and matrix forms will be used
interchangeably in our forthcoming discussion.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 58
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
∫
(3.48a)
∫
{ } { } { }
∫
∫ { }
{ }
A body or a structure is meshed by many elements in a finite element analysis. The meshing
requires the assembly of local stiffness matrix, [ ] and local load vector, { } of individual
element to form the global stiffness matrix, [ ] and the global load vector, { }. Although in
practice, hundreds and thousands of elements might be assembled, herein, only the
assembly of two bar elements is demonstrated for easy tracing of the procedure. Figure 3.5
shows the two assembled beam elements together with the local and global numbering of
nodes and dofs.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 59
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Based on the above and to distinguish different elements we introduce the following
superscript notation:
Having introduced the new superscript system, the local equilibrium for each element can
thus be given as:
For element 1
[ ]{ } (3.50a)
[ ]{ } { }
For element 2
[ ]{ } (3.50b)
[ ]{ } { }
Having established the local matrices and their notation system, the assembly of the two
elements hence the global equilibrium equation is given as
(3.51)
[ ]{ }
{ }
[ ] { }
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 60
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Essential (or displacement) boundary conditions must be imposed before the equilibrium
equation of the beam can be solved. Basic concept of direct imposition of boundary
conditions has been described in detail in previous chapter.
Eqns. (3.15) to (3.18) give all the possible essential boundary conditions of a beam,
reproduced herein for ease of reading as:
(3.52a)
( )|
(3.52b)
( )|
( )| (3.52c)
( )| (3.52d)
EXAMPLE 3.1
Let’s put what we have learned so far into practice. Figure 3.6 shows a cantilever beam
subjected to a distributed load of -2kN/m and an edge point load of -5kN.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 61
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
An analytical solution for the beam can be obtained by conducting integration directly on
the ODE given by Eqn. (3.10) and satisfying the all the relevant boundary conditions (both
force and displacement), which are;
i.
( )| ( )
ii.
( )|
iii.
( )|
iv. ( )| =0
The analytical or the closed form solution of the beam can be given as
( ) ( ) (E3.1)
Herein, we are going to solve the problem by the assembly of two beam elements of equal
length and compare the results against Eqn. (E3.1) to validate the FEM formulation. Due to
the symmetrically, element 1 and element 2 would have a similar local stiffness matrix thus,
(E3.2)
[ ]
(E3.3a)
{ }
{ } (E3.3b)
The assembled global stiffness matrix can be given as (based on Eqn. (3.51)):
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 62
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ]
(E3.4)
[ ]
{ }
(E3.5)
{ } { }
[ ]{ }
{ }
(E3.6)
By imposing the essential boundary conditions (i.e. ), Eqn. (E3.6) is reduced to
(E3.7)
[ ]{ } { }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 63
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
By solving Eqn. (E3.7) using Matlab command “\”, (source code 3.1), the values of the
assembled global dof are thus obtained as:
(E3.8a)
{ }
{ }
Eqn. (E3.8) is the assembled global solution. By inserting these values accordingly into Eqns.
(3.44) the local forces can then be determined. However, before let’s determine first the
global reaction forces, and which can be done by inserting Eqn. (E3.8a) into Eqn.
(E3.6) which yields
{ }
[ ]{ }
{ }
(E3.8b)
(E3.8c)
{ } { }
Now, let’s proceed with determination of the local values. The elemental local solution for
each element is thus
{ } { } { } (E3.9)
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 64
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
{ } { } { } (E3.10)
{ }
Eqns. (E3.9) and (E3.10) are the elemental local solutions. Next, we determine the local
forces.
Element 1
By inserting Eqn. (E3.9) into Eq. (3.44), the local forces can be determined as follows.
{ } [ ]{ } { }
[ ]{ } { }
(E3.11)
{ } { }
{ }
Element 2
By inserting Eqn. (E3.10) into Eq. (3.44), the local force (or reaction if at support) can be
determined as follows.
{ } [ ]{ } { }
[ ]{ } { }
(E3.12)
{ } { }
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 65
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Di D1 D2 D3 D4 D5 D6
Values 0 0 -0.0021 -0.0018 -0.0064 -0.0023
The validity of the formulation is assessed by comparing its result against the exact solution
as given by Eqn. (3.1) and whilst the reactions can as well be obtained analytically, herein
reactions obtained from commercial software are used for validation so as to have diversity
in data sources. The plot of FEM results against the exact solution (Eqn. (E3.1) is shown in
Figure 3.6 which numerical values at several locations along the beam are given in Table 3.2.
Table 3.3 gives the comparison of the reaction forces at support.
wFEM 0 - -
wexact 0 -
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 66
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
wFEM 13 36
Software 13 36
(converged)
Based on the plot and the tables, it can be seen, the assembled two beam elements provide
quite a poor approximation except at the location of the nodes where the results agree with
the closed-form solution and the commercial software. A better hence a converged solution
is provided by the use of more elements. Figure 3.7, Table 3.4 and Table 3.5 show the
convergence if four elements are used.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 67
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
{ } { }
w2-elements
w4-elements
Software (converged)
The convergence of the results above is an immediate demonstration of the beneficial effect
of the use of higher order elements. This is an immediate demonstration to the statement
“FEM converges to the “accurate” solution with the increase in the order of polynomial of
the guessed functions (or degree of freedom and mesh density later on)” which was stated in
previous chapter.
%Input
E=200e6; %kN/m^2
b=0.2; %m
h=0.2; %m
A=b*h; %m^2
I=(b*h^3)/12; %m^4
L1=2; %m
L2=2; %m
P=-5; %kN
q=-2; %kN/m
%Create Stifness
klocal1=[(12*E*I/L1^3) (6*E*I/L1^2) -(12*E*I/L1^3) (6*E*I/L1^2);
(6*E*I/L1^2) (4*E*I/L1) -(6*E*I/L1^2) (2*E*I/L1);
-(12*E*I/L1^3) -(6*E*I/L1^2) (12*E*I/L1^3) -(6*E*I/L1^2);
(6*E*I/L1^2) (2*E*I/L1) -(6*E*I/L1^2) (4*E*I/L1)];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 68
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
%Assemble
Kglobal=zeros(6,6);
Kglobal(1:4,1:4)=Kglobal(1:4,1:4)+klocal1;
Kglobal(3:6,3:6)=Kglobal(3:6,3:6)+klocal2;
KG=Kglobal;
Fglobal=zeros(6,1);
Fglobal(1:4,1)=Fglobal(1:4,1)+flocal1;
Fglobal(3:6,1)=Fglobal(3:6,1)+flocal2;
FG=Fglobal;
Fglobal(5,1) =Fglobal(5,1)+P;
%Impose BC
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Fglobal(2,:)=[];
Fglobal(1,:)=[];
%Solve
U=Kglobal\Fglobal;
% Reaction
UU=[0;0;U(1,1);U(2,1);U(3,1);U(4,1)];
R=KG*UU-FG;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 69
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
CHAPTER 4
4.1 INTRODUCTION
In the previous chapters, we have discussed the derivation of FEM formulation for bar and
beam elements. However, these elements were arranged and assembled in a line. A more
general arrangement would require the elements to be arbitrarily oriented and assembled.
Assembly of such oriented elements would make up a truss system and a frame system,
respectively. As we are going to see, the orientation process requires the introduction of the
transformation matrix. The use of this matrix is to transform local entities into global
entities. Another point to emphasize is the introduction of two degree of freedoms and two
load components into the bar element’s global representation. Also, since the construction
of a frame would require the transfer of axial load/force, a beam element is supplied with
extra degree of freedoms in the axial direction. As can be seen, this will involve the
combination of previously derived bar and beam elements to form what is called beam-
column element.
A truss system is an assembled of inclined bar elements. Figure 4.1 shows a typical
arrangement of a plane truss system.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 70
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
To allow for the inclination and the corresponding assembly, a bar element formulation
must be re-expressed in global manner. In a global frame, a bar element would have two
degree of freedoms per node.
An inclined bar is shown in Figure 4.2a together with the newly introduced elemental global
direction dofs and previously defined local dofs. Note that, to distinguish between local and
elemental global direction dofs, the former is primed.
For a linear bar (two-nodes bar), by considering the geometry of Figure 4.2 the relationship
between the local and the elemental global dofs can be given as,
(4.1 a)
(4.1 b)
(4.2)
{ } [ ]{ }
or
{ } [ ]{ } (4.3a)
where { } is the vector of local dofs, [ ] is from now on is called the bar transformation
matrix and { } is the elemental global dofs of the bar element.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 71
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ] [ ] (4.3b)
So far, we have established the relationship between local dofs of bar and its elemental
global dofs. Now we are going to establish the relationship between local forces and the
elemental global forces. By referring to Figure 4.2b, the relationship can be as;
(4.4 a)
(4.4 b)
(4.4 c)
(4.4 d)
In matrix forms Eqns. (4.4) can be given as
(4.5)
{ } [ ]{ }
A comparison with Eqns. (4.2) and (4.3) would show that the 4 by 2 matrix on the right hand
side of Eqn. (4.5) is actually the transpose of the transformation matrix, [ ]. Realizing this
Eqn. (4.5) can be given as
{ } [ ] { } (4.6)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 72
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
where { } is the vector of elemental global forces and { } is the vector of the local forces of
the bar. Eqn. (4.6) is therefore the relationship between global and local forces of an
element.
Having established the relationship between elemental global and local entities for both
dofs and forces, we are now in the position to establish the elemental global equilibrium
equation for the inclined bar element from its local equation. First we write the local
equation of the bar (previously given as Eqn. (2.30) but with the prime superscript to
distinguish them from their corresponding elemental global entities):
[ ]{ } { } (4.7)
Note that, as given in Eqn. (2.29), { } { }. Inserting Eqn. (4.3) into Eqn. (4.7) would
then give
[ ][ ]{ } { } (4.8)
Now, we multiply the transpose of transformation matrix, [ ] to both sides of Eqn. (4.8) to
obtain
[ ] [ ][ ]{ } [ ] { } (4.9)
Observing Eqn. (4.9) we should notice that the right hand side terms is also the previously
given Eqn. (4.6). So, by inserting Eqn. (4.6) into (4.9), we obtain
[ ] [ ][ ]{ } { } (4.10)
Based on Eqn. (4.10) we can conclude that the elemental global stiffness matrix of the bar,
[ ]can be defined as
[ ] [ ] [ ][ ] (4.11 a)
which for a linear bar element, [ ]can explicitly be given as
(4.11 b)
[ ] [ ][ ]
[ ]{ } { } (4.12)
Once the elemental global equilibrium equation is established, the assembly, the imposition
of essential boundary conditions and the solution process follow the same as outlined
previously. However once a solution is obtained, the corresponding local values becomes of
interest. The determination of the internal axial forces in the bar requires the solved dofs,
{ } to be inserted back into Eqn. (4.8) and the axial displacement, on the other hand can be
obtained by inserting { } into Eqn. (4.3a). However before such a procedure can be
executed, the truss elements must be assembled first.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 73
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
What we have derived so far are the elemental global entities. To solve the problem, these
entities must be assembled. The discussion on the assembly of a truss system can be best
done by considering a typical arrangement as shown in Figure 4.3.
Figure 4.3 shows both elemental global dofs { } for each element and the assembled global
{ } for the whole structure. The assembly of the elemental values into assembled matrix
and vectors can be done by correlating the elemental numbering subscript to the assembled
numbering. For example, by observing Figure 4.3, we can correlate that, say, of
elemental 2 to in the assembled matrix because it can be traced that elemental
subscript 3 corresponds to assembled subscript 5 (i.e. ) and elemental subscript 1
corresponds to assembled subscript 3 (i.e. ). Based on this, the following is the
correlation between elemental entities to assembled entities for typical truss system of
Figure 4.3.
For element 1
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 74
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Note that the correlation of element 1 seems to agree directly with the assembled
numbering because their numbering is accidental from the beginning. Such a direct
correlation will not exist for element 2 as we can see next.
For element 2
Having established the above correlation, we thus can build the assembled global stiffness
matrix, as
[ ] (4.13)
[ ]
Based on the same correlation argument, the assembled load vector, { } can thus be given
as
(4.14)
{ }
{ }
{ }
Finally, we complete our discussion on truss system formulation by writing down the
assembled global equilibrium equation as
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 75
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(4.15)
{ }
[ ] { }
or
[ ]{ } { } (4.16)
By imposing the essential boundary conditions, { } can then be solved.
Now, let’s nail our understanding with an example and the corresponding Matlab source
code.
EXAMPLE 4.1
In this example, we are required to determine the internal axial forces, reaction forces at
supports and displacements of a truss system as shown in Figure (E4.1)
Based on the data given in the figure, the local stiffness matrix for each element,
determined based on Eqn. (2.33a), is given below. Note that, the external point load is
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 76
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
inserted directly into the assembled global load vector once everything is assembled; an act
which omits the requirement for it to be considered at a local level.
Element 1
[ ] [ ] (E4.1)
Element 2
[ ] [ ] (E4.2)
Element 3
[ ] [ ] (E4.3)
Their corresponding element global entities can be determined using Eqns. (4.11) as follows.
Element 1
[ ] [ ] [ ][ ]
[ ][ ]
(E4.4)
[ ]
[ ]
[ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 77
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Element 2
[ ]
[ ]
[ ]
[ ]
(E4.5)
Element 3
[ ] [ ]
[ ]
[ ]
(E4.6)
Having established the elemental global stiffness for each element, the assembled global
stiffness matrix, [ ] is thus given as (refer Eqn. (4.13)
[ ]
[ ]
(E4.7)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 78
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
{ }
(E4.8a)
{ } { }
The complete equilibrium equation can thus be given as
[ ]{ } { }
(E4.8b)
To note, , , and are the global reactions. These are unknown because their
corresponding dofs are the essential boundary conditions which are known values. By
imposing the essential boundary conditions ( ), the assembled global
equilibrium equation is reduced to
(E4.9)
[ ]{ } { }
By solving Eqn. (E4.9) using Matlab command “\”, (source code 4.1), the values of the
assembled global dofs are thus obtained as:
(E4.10a)
{ }
{ }
Eqn. (E4.10) is the assembled global solution. By inserting these values accordingly into
Eqns. (4.3a) and (4.7) the local values can then be determined (i.e. axial displacements and
local forces). However, before that, let’s determine first the global reaction forces, , ,
and which can be done by inserting Eqn. (4.10) into Eqn. (4.8b) which yields
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 79
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
{ }
[ ]{ }
{ }
The reaction forces at support can thus obtained as:
(E4.10b)
{ } { }
Now, let’s proceed with determination of the local values. The elemental global solution for
each element is thus
{ } { } { } (E4.11)
{ }
{ } { } { } (E4.12)
{ }
{ } { } { } (E4.13)
{ }
Eqns. (E4.11) to (E4.13) are the elemental global solutions. In practice, local values are of
interest. To obtain local axial displacements and local internal forces, Eqns. (4.3a) and (4.7)
and are respectively reemployed.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 80
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Element 1
By inserting Eqn. (E.4.11) into Eqn. (4.3a), the local dofs (axial displacements) are
determined as follows.
{ } [ ]{ }
{ } [ ]
{ }
[ ]{ }
{ } (E4.14)
Eqn. (4.14) give the local dofs of element 1. By inserting this equation into Eq. (4.7), the local
forces can be determined as follows.
{ } [ ]{ } { }
{ } [ ]{ } { }
(E4.15)
{ }
Note that in the above, { } is equalled to zero because no distributed load acts on the
element.
Element 2
By inserting Eqn. (E4.12) into Eqn. (4.3a), the local dofs (axial displacement) is determined as
follows.
{ } [ ]{ }
{ }
(E4.16)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 81
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Eqn. (E4.16) gives the local dofs of element 2. By inserting this equation into Eqn. (4.7), the
local forces can be determined as follows.
{ } [ ]{ } { }
{ } [ ]{ } { }
(E4.17)
{ }
Note that in the above, { } is equalled to zero because no distributed load acts on the
element.
Element 3
By inserting Eqn. (E4.13) into Eqn. (4.3a), the local dofs (axial displacement) is determined as
follows.
{ } [ ]{ }
{ }
(E4.18)
Eqn. (E4.18) gives the local dofs of element 3. By inserting this equation into Eqn. (4.7), the
local force can be determined as follows.
{ } [ ]{ } { }
{ } [ ]{ } { }
(E4.19)
{ }
Note that in the above, { } is equalled to zero because no distributed load acts on the
element.
The obtained results are validated herein against those obtained with commercial software.
Table E4.1 compares the results of local dofs whilst Table E4.2 and Table E4.3 compare the
results of the global reactions and internal forces, respectively.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 82
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
3 0 0
3 10 compression 10 compression
Based on Tables E4.1, E4.2 and E4.3, it can be concluded that the formulation agrees well
with the results produced by the commercial software. However, it must be noted that the
tabulated values are those taken from nodal locations. To have better accuracy elsewhere,
normally denser mesh (more elements) is needed for convergence.
Figure E4.2 shows the deformation of the truss system, plotted based on the obtained
results (magnified for easy viewing).
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 83
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 84
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Due to the need to cater for the axial forces and displacement, a plane beam-column
element can be formulated by combining bar element and Euler-Bernoulli beam element
together. Thus an arrangement of a beam-column element can be given as in Figure 4.5.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 85
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Please note the numbering system set up for the beam-column element. This is for
convenience purposes which to be seen later. Based on such an arrangement, the local dof
vector of the beam is thus given as:
{ }
(4.17)
{ }
Note also that in Eqn. (4.17), the variables are primed since they represent local values.
Based on the arrangement of the dofs, the stiffness matrix and the load vector of the beam-
column are thus given as:
(4.18)
[ ]
[ ]
and the load vector is given as:
{ }
(4.19)
{ }
where and are the axial (or bar) related load values as given by Eqn. (2.34a), and
and bending as well shearing (Euler beam) related load values as given by Eqn.
(3.48). Note that { } { }.
As in bar, the assembly of the frame system requires the local entities i.e. [ ], { }, { } of
the beam-column element to be transformed into elemental global entities. Fortunately,
the general formulations previously derived for bar elements are still applied for beam-
column element thus the elemental global dofs, { } of beam-column is given as
{ } [ ]{ } (4.20)
the elemental global load vector { } as
{ } [ ] { } (4.21)
and the elemental global stiffness matrix [ ] as
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 86
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ] [ ] [ ][ ] (4.22)
All we need now is to establish the transformation matrix for the beam-column element.
This is done next.
Based on Figure 4.6, the relationship between local dofs { } and its elemental global
counterpart { } can be given as
(4.22a)
(4.22b)
(4.22c)
(4.22d)
(4.22e)
(4.22f)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 87
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(4.23)
[ ]{ }
{ }
or
{ } [ ]{ } (4.24)
hence the attainment of the equation previously given as Eqn. (4.20). The attainment of
Eqn. (4.24) also yields the transformation matrix for beam-column element, that is;
(4.25)
[ ]
[ ]
Having established the transformation matrix, [ ] of the beam-column element, further
discussion on frame system analysis follows the same procedure previously outlined for
truss element.
EXAMPLE 4.2
In this example, a plane frame as shown in Figure E4.2 is going to be analysed. Both local
and global displacements (dofs) and nodal forces of the structure are going to be
determined.
Figure E4.2 Plane Frame with a single point load and uniform load.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 88
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Based on the data given in, the local stiffness matrix and local load vector for each element,
determined based on Eqn. (4.18) and Eqn. (4.19) are as given below. Note that, the external
point load is inserted directly into the assembled global load vector once everything is
assembled; an act which omits the requirement for it to be considered at a local level.
Element 1
[ ]
[ ]
(E4.12)
and
(E4.13)
{ }
To note, and are the local reactions at support for element 1 and unknown
variables (to be solved) since the corresponding displacement (essential boundary
conditions) are known.
Element 2
[ ]
(E4.14)
[ ]
and
(E4.15)
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 89
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
To note, and are the local reactions at support for element 2 and unknown
variables (to be solved) since the corresponding displacement (essential boundary
conditions) are known.
The corresponding elemental global stiffness matrix and elemental global load vector can be
determined using Eqn. (4.22) and Eqn. (4.21) given as follows.
Element 1
[ ] [ ] [ ][ ]
[ ][ ]
[ ]
[ ][ ]
[ ]
[ ]
(E4.16)
and
{ } [ ] { }
[ ] { }
{ } { } { }
(E4.17)
Take note that the unprimed i.e. and represent the elemental reaction forces. Due to
the transformation, it can be seen that, there are possibilities for what used to be in the x-
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 90
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
direction to be the y-direction and vice versa and what to be in one direction to be in the
other direction.
Element 2
[ ] [ ] [ ][ ]
[ ][ ]
(E4.18)
[ ]
[ ]
and
{ } [ ] { }
(E4.19)
[ ] { }
{ }
Take note that the unprimed i.e. , and represent the element reaction forces which
description is similar to the one given for element 1.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 91
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Having established the elemental global stiffness for each element, the assembled global
stiffness matrix, [ ] is thus given as
[ ]
[ ]
(E4.20)
The assembled global load vector is given as
{ }
(E4.21a)
{ }
[ ]{ }
{ }
(E4.21b)
To note, , , and are the global reactions. These are unknown because their
corresponding dofs are the essential boundary conditions which are known values. By
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 92
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(E4.22)
[ ]{ } { }
By solving Eqn. (E4.22) using Matlab command “\”, (source code 4.2), the values of the
assembled global dofs are thus obtained as:
(E4.23a)
{ }
{ }
Eqn. (E4.23) is the assembled global solution. By inserting these values accordingly into
Eqns. (4.24) and (4.7), the local values can then be determined (i.e. local displacements and
local forces). However, before let’s determine first the global reaction forces, , ,
, ,and which can be done by inserting Eqn. (E4.23a) into Eqn. (E4.21b) which yields
{ }
[ ]{ }
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 93
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(E4.23b)
{ } { }
Now, let’s proceed with determination of the local values. The elemental global solution for
each element is thus
(E4.24)
{ }
{ } { }
{ }
(E4.25)
{ }
{ } { }
{ }
Eqns. (E4.24) and (E4.25) are the elemental global solutions. In practice, local values are of
interest. To obtain local internal forces and local displacements, Eqns. (4.7) and (4.20) are
respectively reemployed.
Element 1
By inserting Eqn. (E.4.24) into Eqn. (4.20), the local dofs are determined as follows.
{ } [ ]{ }
[ ]
{ } { }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 94
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ]{ }
{ } (E4.26)
Eqn. (E4.26) gives the local dofs of element 1. By inserting this equation into Eq. (4.7), the
local force (or reaction if at support) can be determined as follows.
{ } [ ]{ } { }
(E4.27)
[ ]{ } { }
{ }
Note that in the above, { } is equalled to zero because no distributed load acts on the
element.
Element 2
By inserting Eqn. (E4.25) into Eqn. (4.20), the local dofs (axial displacement) is determined as
follows.
[ ]{ }
{ }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 95
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
{ }
(E4.28)
Eqn. (E4.28) gives the local dofs of element 2. By inserting this equation into Eqn. (4.7), the
local force (or reactions if at support) can be determined as follows.
{ } [ ]{ } { }
[ ]{ }
(E4.29)
{ }
{ } { } { }
The obtained results are validated herein against those obtained from commercial software.
Table E4.4 compares the results of local dofs whilst Table E4.5 and Table E4.6 compare the
results of global reactions and internal forces, respectively.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 96
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
0
3 0 0
0 0
0 0
* since and are in radian, the values are too small thus agree actually with null
values produced by the software.
Based on Tables E4.4, E4.5 and E4.6, it can be concluded that the formulation agrees well
with the results produced by the commercial software. However, it must be noted that the
tabulated values are those taken from nodal locations. To have better accuracy elsewhere,
normally denser mesh (more elements) is needed for convergence.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 97
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Figure E4.3 shows the deformation of the frame system, plotted based on the obtained
results (magnified for easy viewing).
%Input
E=200e6; %kN/m^2
A=0.04; %m^2
L1=4; %m
L2=6.403;
L3=5;
theta1=0; %rad
theta2=pi-atan(5/4);%rad
theta3=90*pi/180; %rad
P=-10; %kN
%Create Stifness
klocal1=[(A*E)/L1 -(A*E)/L1;
-(A*E)/L1 (A*E)/L1];
klocal2=[(A*E)/L2 -(A*E)/L2;
-(A*E)/L2 (A*E)/L2];
klocal3=[(A*E)/L3 -(A*E)/L3;
-(A*E)/L3 (A*E)/L3];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 98
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
%Transformation matrix
c=cos(theta1);
s=sin(theta1);
T1=[c s 0 0;
0 0 c s];
Kglobal1=T1'*klocal1*T1;
c=cos(theta2);
s=sin(theta2);
T2=[c s 0 0;
0 0 c s];
Kglobal2=T2'*klocal2*T2;
c=cos(theta3);
s=sin(theta3);
T3=[c s 0 0;
0 0 c s];
Kglobal3=T3'*klocal3*T3;
%Assemble
Kglobal=zeros(6,6);
Kglobal(1:4,1:4)=Kglobal(1:4,1:4)+Kglobal1;
Kglobal(3:6,3:6)=Kglobal(3:6,3:6)+Kglobal2;
Kglobal(1:2,1:2)=Kglobal(1:2,1:2)+Kglobal3(1:2,1:2);
Kglobal(1:2,5:6)=Kglobal(1:2,5:6)+Kglobal3(1:2,3:4);
Kglobal(5:6,1:2)=Kglobal(5:6,1:2)+Kglobal3(3:4,1:2);
Kglobal(5:6,5:6)=Kglobal(5:6,5:6)+Kglobal3(3:4,3:4);
Fglobal=[0;0;0;P;0;0];
KG=Kglobal;
%Impose BC
Kglobal(5,:)=[];
Kglobal(:,5)=[];
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Fglobal(5,:)=[];
Fglobal(2,:)=[];
Fglobal(1,:)=[];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 99
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
% Reaction
UG=[0;0;U(1,1);U(2,1);0;U(3,1)];
R=KG*UG
%Input
E=200e6; %kN/m^2
b=0.2; %m
h=0.2; %m
A=b*h; %m^2
I=(b*h^3)/12; %m^4
L1=5;
L2=4;
theta1=90*pi/180; %rad
theta2=0; %rad
P=10; %kN
q=-5; %kNm
%Create Stifness
klocal1=[(A*E/L1) 0 0 -(A*E/L1) 0 0;
0 (12*E*I/L1^3) (6*E*I/L1^2) 0 -(12*E*I/L1^3) (6*E*I/L1^2);
0 (6*E*I/L1^2) (4*E*I/L1) 0 -(6*E*I/L1^2) (2*E*I/L1);
-(A*E/L1) 0 0 (A*E/L1) 0 0;
0 -(12*E*I/L1^3) -(6*E*I/L1^2) 0 (12*E*I/L1^3) -(6*E*I/L1^2);
0 (6*E*I/L1^2) (2*E*I/L1) 0 -(6*E*I/L1^2) (4*E*I/L1)];
klocal2=[(A*E/L2) 0 0 -(A*E/L2) 0 0;
0 (12*E*I/L2^3) (6*E*I/L2^2) 0 -(12*E*I/L2^3) (6*E*I/L2^2);
0 (6*E*I/L2^2) (4*E*I/L2) 0 -(6*E*I/L2^2) (2*E*I/L2);
-(A*E/L2) 0 0 (A*E/L2) 0 0;
0 -(12*E*I/L2^3) -(6*E*I/L2^2) 0 (12*E*I/L2^3) -(6*E*I/L2^2);
0 (6*E*I/L2^2) (2*E*I/L2) 0 -(6*E*I/L2^2) (4*E*I/L2)];
%Transformation matrix
c=cos(theta1);
s=sin(theta1);
T1=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal1=T1'*klocal1*T1;
Fglobal1=T1'*flocal1;
c=cos(theta2);
s=sin(theta2);
T2=[c s 0 0 0 0;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 100
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal2=T2'*klocal2*T2;
Fglobal2=T2'*flocal2;
%Assemble
Kglobal=zeros(9,9);
Kglobal(1:6,1:6)=Kglobal(1:6,1:6)+Kglobal1;
Kglobal(4:9,4:9)=Kglobal(4:9,4:9)+Kglobal2;
KG=Kglobal;
Fglobal=zeros(9,1);
Fglobal(1:6,1)=Fglobal(1:6,1)+Fglobal1;
Fglobal(4:9,1)=Fglobal(4:9,1)+Fglobal2;
FG=Fglobal;
Fglobal(4,1) =Fglobal(4,1)+P;
%Impose BC
Kglobal(9,:)=[];
Kglobal(:,9)=[];
Kglobal(8,:)=[];
Kglobal(:,8)=[];
Kglobal(7,:)=[];
Kglobal(:,7)=[];
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Fglobal(9,:)=[];
Fglobal(8,:)=[];
Fglobal(7,:)=[];
Fglobal(2,:)=[];
Fglobal(1,:)=[];
%Solve
U=Kglobal\Fglobal
% Reaction
UU=[0;0;U(1,1);U(2,1);U(3,1);U(4,1);0;0;0];
R=KG*UU-FG
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 101
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
CHAPTER 5
5.1 INTRODUCTION
In previous chapters, we have been dealing with structures which are loaded in the direction
of the degree of freedoms; point loads (either equivalent or nodal loads) in the direction of
the translational dof or applied moment in the direction of the rotational dof. Herein, we
are going to discuss a quite different situation that is, the deformation which is
“ungoverned’ by loads that are acting on the structure.
The word “ungoverned”, however, requires further elaboration. The word refers to the
statement that the load vector, { } or { } is set to zero. Mathematically this means solving
only the homogenous part of the differential equation of the problem. The resulting values
would be some properties of the structure and their corresponding deformation.
For example, free vibration refers to the “vibration” of a structure which is described by the
natural frequencies and the corresponding mode shapes, without any explicit consideration
on the type of external loading. Only during the discussion of resonance, these frequencies
would then be compared with the incoming frequencies (external loads).
Same goes to the discussion of buckling of a structure. The load that would cause the
buckling will be specific critical values of compressive axial force termed as buckling loads.
As will be seen, since Euler-Bernoulli beam formulation able to capture such a phenomenon
and determine the buckling loads and their corresponding buckling modes without the need
to introduce axial dofs, it should be obvious that the bucking loads and their modes are not
governed by the external applied loads.
Since both values (natural frequencies, buckling loads) are not governed by the loads, they
must be some properties of the structure hence the name “eigen” which means “inherent”
or “characteristic” in German. Then, what governs their values? Something must affect their
values, must not they? As some properties, they are governed by other properties of the
structures; material and geometrical properties. In our discussion on bar, beam and their
inclined elements, these would be Young’s modulus, , cross-sectional area, , second
moment of area, and element's length, .
Also, since these values are “ungoverned’ by the loads, we will see that the FEM formulation
for both problems will involve with the discretization of their differential equations without
the forcing terms hence the setting up of load vector, { } or { } to zero.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 102
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Accordingly, all physical problems that fall under the same argument are called
eigenproblems as their equilibrium equations can all be arranged into a standard
mathematical statement. If [ ] and [ ] are square matrices with known coefficients and is
an unknown constant, an eigenproblem is a problem that can be described by the following
typical mathematical statement;
[ ] [ ] { } (5.1)
For free vibration analysis, matrix [ ] represents the stiffness matrix, [ ], matrix [ ]
represents the mass matrix, [ ], constant represents the square of natural frequencies
and vector { } represents the vector of mode shape dofs { ̂ }.
For buckling problem, matrix [ ] represents the stiffness matrix, [ ], matrix [ ] represents
the stress stiffness matrix [ ], constant represents the buckling load, and vector { }
represents the buckling modes. Table 5.1 summarizes these.
{ } { ̂} { }
[ ] [ ] { } [ ] [ ] { } [ ] [ ] { }
Besides having a typical statement, eigenproblem also has a typical argument for the
solution that is;
“The solution of Eqn. (5.1) has two solutions, the trivial solution when { } =0 and the non-
trivial solution when the determinant of the coefficient matrices is zero i.e. [ ] [ ]
. Since a trivial solution would also mean that there will be no deformation, a non-trivial
solution is therefore the solution of interest.”
|[ ] [ ]| (5.2)
will result in a characteristic polynomial. If the coefficient matrices are matrix, the
resulting characteristic polynomial will be in the forms;
(5.3)
where , , and are constants resulted from the process of setting up the
determinant to zero. For matrices, the resulting polynomial would be
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 103
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.4)
The four roots of Eqn. (5.3) and the roots of Eqn. (5.4) are thus the eigenvalues for the
problem. For free vibration, these would be the natural frequencies and for buckling
problem, these would be the buckling loads. Inserting one of the roots (or eigenvalues) back
into Eqn. (5.1) will allow the eigenvector for that particular eigenvalue to be solved hence
determined. For free vibration, the eigenvector is the mode shape associated with the
inserted natural frequency and for buckling problem, the eigenvector is the buckling mode.
However it must be noted that the whole process is lacking one equation. Say, coefficient
matrices of Eqn. (5.1) are matrix. This means vector { } would consist of four
unknowns i.e. , , and and with as another unknown. In this situation, we have
five unknowns in total with only four simultaneous equations. There are two ways to
proceed;
In the next section, we are going to discuss all these in more detail by focusing on the FEM
formulation of free vibration of bar and beam followed by a discussion on the buckling
analysis of beam. Formulation for plane frame is given last.
Free vibration analysis of a bar concerns the determination of the value of the natural
frequencies of the bar and their corresponding mode shapes. Such information is important
especially in the consideration of resonance; a large deformation induced by an external
load (which can be small in magnitude if compared to the ‘strength’ of the bar) which
frequency is close to the natural frequency of the bar.
The discussion on free vibration of bar requires the derivation of the bar’s partial differential
equation subjected to time-dependent external loading. Whilst the homogenous part of the
PDE will be solved herein hence the term “free vibration”, the complete PDE will be solved
in the next chapter where we consider FE formulation for dynamic problem hence the form
“forced vibration” therein.
The derivation of the bar’s PDE of motion is basically similar to the one outlined in Chapter
2, except that
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 104
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
where represents the acceleration of the bar and is the mass per unit length of
the bar since is the density and is the cross-sectional of the bar respectively.
Having established the above, a typical bar configuration with time dependent loading is
given in Figure A5.1a) while Figure A5.1b) shows the corresponding differential element.
Based on Figure A5.1b), the equilibrium of forces in the axial direction is employed:
∑ (A5.1)
which yield
(A5.2)
where is the time-varying axially distributed external loading and is the axial
displacement.
(A5.3)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 105
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(A5.4)
and since
(A5.5)
By differentiating Eqn. (A5.5) once and inserting into Eqn. (A5.3), we obtain
(A5.6)
Eqn. (A5.6) is the PDE of motion of the bar in terms of axial displacement as required. It
describes the behaviour of the bar when subjected to time-varying loading (or time-varying
force boundary conditions). The discussion on its solution will be given in the next chapter
where therein, we will discuss the topic of dynamic. However, herein, as mentioned, since
we are dealing with eigenproblem, we will discuss the solution of the homogenous part of
the equation thus;
(A5.7)
Since an eigenproblem does not involve “loading”, Eqn. (A5.7) does not require any
specification of the force (natural) boundary conditions. All it needs are the essential
boundary conditions which are given as
| (A5.8)
| (A5.9)
Having established the bar’s vibration PDE, we are now all set to discretize the equation by
FEM.
Like previous elements, the discretization process begins with the provision of the
interpolation function (for liner bar element)
(A5.10a)
or in component forms as
(A5.10b)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 106
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
where and are the shape functions and degree of freedoms as previously given in
Chapter 2 for linear bar element (Eqn. (2.13d)).
(A5.11a)
or in component forms as
( ) ( ) (A5.11b)
Having established the PDE in terms of shape functions and dofs, we then multiply Eqn.
(A5.11b) with weight functions, consecutively and integrate the inner product so as to
obtain the discretised equation.
Thus
( ) ( ) (A5.12)
∫ ( )
Next, we conduct integration by parts (IBP) to the first term. It must be noted that such
integration is no longer conducted to induce naturally the force boundary conditions as this
is an eigenproblem but to optimize on the continuity relaxation only. Also, no IBP is
conducted to the second term because the term is not a spatial derivative but a time
derivative. In fact, the time derivative term requires further elaboration which will be given
next. But until then, let’s conduct IBP to Eqn. (A5.12) so as to obtain
( ) ( ) (A5.13)
∫ ∫
Whilst the first integral term is familiar to us from the discussion of bar in Chapter 2, the
second term, as mentioned, deserves further explanation. In this term, the shape functions,
is taken out from the derivative since it will not involve with the differentiation due to
the fact that the shape functions are not function of time, but function of only. But
something must be a function of time; else the second term would vanish. This leaves us
with nothing but the degree of freedoms, . So, must be a function of time, thus must
involve in the differentiation as shown in Eq. (A5.13). Now, by expressing the time second
derivative by a double dot, ̈ , Eq. (A5.13) can be given in matrix forms as
[ ]{ } [ ]{ ̈ } (A5.14)
where [ ] is the stiffness matrix of the bar (similar to Eqn. (2.31b)) and [ ] is termed as the
equivalent mass matrix of the beam. These matrices can be given as
(A5.15a)
[ ] ∫
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 107
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(A5.15b)
[ ] ∫
To note, [ ] given by Eqn. (A5.15b) is termed as equivalent mass matrix as it is derived by
the integration of shape functions in the same sense as the equivalent nodal loads hence
the term “equivalent”. An alternative is to simply lump the mass at the nodal location to
result in a lumped mass matrix. Due to its simplicity, lumped mass matrix is not discussed
herein.
(A5.16)
∫
By inserting and of Eqn (2.13d), Eqn. (A5.16) will become
(A5.17)
∫ ( )( )
By conducting the integration to Eqn. (A5.17), is obtained as
(A5.18)
The complete integrated values of [ ] for a bar element can thus be given as
(A5.19)
[ ] [ ]
Now, as mentioned, to derive the eigenproblem statement for the bar problem, we must
express { } as a function of time and we can do this by employing separation of variable
which gives
{ } { ̂} (A5.20)
Based on Eqn. (A5.20) we can say that in time dimension, our { } vary in a harmonic manner
with amplitudes { ̂} and frequencies, . Inserting Eqn. (A5.20) into Eqn. (A5.14) and by
conducting the differentiation in time twice would give
[ ]{ ̂} [ ]{ ̂} (A5.21)
By collecting and by expressing (the latter is to suit earlier definition), Eqn. (A5.21)
can be given as
[ ] [ ] { } (A5.22)
As mentioned, Eqn. (A5.22) has two solutions; trivial and non-trivial. The latter is of interest
to us and this is when the determinant of the multiplying matrix is set to zero;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 108
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
|[ ] [ ]|=0 (A5.23)
Once essential boundary conditions are imposed, Eqn. (A5.23) will yield a polynomial
characteristic equation in the forms of Eqn. (5.4) which roots would be the eigenvalues,
mathematically and square of the natural frequencies, physically. Consecutive insertion of
these roots back into Eqn. (A5.23) gives the corresponding eigenvector or mode shape; the
former is a mathematical terms whilst the latter is a physical terms.
However, with Matlab, this process can automatically be carried out using the built-in
function eig(). All we need to do is to establish stiffness matrix, [ ] and mass matrix, [ ],
assemble them and impose the essential boundary conditions. The rest of the process will
be taken care by the built-in function.
|[ ] [ ]| (A5.24)
which the assembled nature is highlighted by the use of capital letters. The assembly
process is similar to the one outlined in Chapter 4.
Free vibration analysis of a beam concerns the determination of the value of the natural
frequencies of the beam and their corresponding mode shapes. Such information is
important especially in the consideration of resonance; a large deformation induced by an
external load (which can be small in magnitude if compared to the ‘strength’ of the beam)
which frequency is close to the natural frequency of the beam.
The discussion on free vibration of beam requires the derivation of the beam’s partial
differential equation subjected to time-dependent external loading. Whilst the homogenous
part of the PDE will be solved herein hence the term “free vibration”, the complete PDE will
be solved in the next chapter where we consider FE formulation for dynamic problem hence
the form “forced vibration” therein.
The derivation of the beam’s vibration partial differential equation (PDE) is basically similar
to the one outlined in Chapter 3, except that
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 109
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Having established the above, a typical beam configuration with time dependent loading is
given in Figure 5.1a) while Figure 5.1b) shows the corresponding differential element.
∑ (5.5)
∑ (5.6)
∑ (5.7)
which yield
(5.8)
( )
(5.9)
( )
where
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 110
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.10)
(5.11)
To arrive at Eqn. (5.11), higher order terms have been assumed as insignificant thus
omitted. By differentiating Eqn. (5.11) once and then inserting it into Eqn. (5.10) give
(5.12)
Eqn. (5.12) is the differential equation of the beam in terms of both moment force and
displacement. But since our FEM discussion focuses on displacement-based formulation, we
need to express the PDE completely in terms of displacement. This can be done by
employing the constitutive equation which relates the curvature of the beam with the
moment force given as
(5.13)
where is the Young’s modulus of the material and is the second moment of area of the
beam’s cross-section. Together, they are known as the flexural stiffness of the beam, .
By differentiating Eqn. (5.13) twice and inserting into Eqn. (5.12), we obtain
(5.14)
Eqn. (5.14) is the PDE of the beam in terms of displacement as required. It describes the
behaviour of the beam when subjected to time-varying loading (or time-varying force
boundary conditions). The discussion on its solution will be given in the next chapter where
therein, we will discuss the topic of dynamic. However herein, as mentioned, since we are
dealing with eigenvalue problems, we will discuss the solution of the homogenous part of
the equation only thus
(5.15)
Since eigenproblems do not involve with “loading”, Eqn. (5.15) does not require any
specification of the force (natural) boundary condition. All it needs are the essential
boundary conditions which can be a single or a combination of the following;
(5.16)
|
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 111
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.17)
|
| (5.18)
| (5.19)
where , are the specified end rotations and , are the specified end transverse
displacements. Having established the beam’s vibration PDE, we are now all set to discuss
its discretization by FEM.
Like previous elements, the discretization process begins with the provision of the
interpolation function
(5.21a)
or in component forms as
(5.21b)
where and are the shape functions and degree of freedoms as previously given in
Chapter 3 for Euler-Bernoulli beam.
(5.22a)
or in component forms as
( ) ( ) (5.22b)
Having established the PDE in terms of shape functions and dofs, we then multiply Eqn.
(5.22b) with weight functions, consecutively and integrate the inner product so as to obtain
the discretised equation.
Thus
( ) ( ) (5.23)
∫ ( )
Next, we conduct integration by parts (IBP) to the first term. It must be noted that such
integration is no longer conducted to induce naturally the force boundary conditions as this
is an eigenproblem but to optimize on the continuity relaxation only. Also, no IBP is
conducted to the second term because the term is not a spatial derivative but a time
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 112
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
derivative. In fact, the time derivative term requires further elaboration which will be given
next. But until then, let’s conduct IBP to Eqn. (5.23) so as to obtain
( ) ( ) (5.24)
∫ ∫
Whilst the first integral term is familiar to us from the discussion of beam bending in
Chapter 3, the second term, as mentioned, deserves further explanation. In this term, the
shape functions, is taken out from the derivative since it would not involve with the
differentiation due to the fact that the shape functions are not function of time, but
function of only. But something must be a function of time else the second term would
vanish. This leaves us with nothing but the degree of freedoms, . So, must be a function
of time, thus must involve in the differentiation as shown in Eq. (5.24). Now, by expressing
the time second derivative by a double dot, ̈ , Eq. (5.24) can be given in matrix forms as
[ ]{ } [ ]{ ̈ } (5.25)
where [ ] is the stiffness matrix of the beam (similar to Eqn. 3.47) and [ ] is termed as the
equivalent mass matrix of the beam. These matrices can be given as
(5.26a)
[ ] ∫
(5.26b)
[ ] ∫
To note, [ ] as given by Eqn. (5.26b) is termed as equivalent mass matrix as it is derived by
the integration of shape functions in the same sense as the equivalent nodal loads hence
the term “equivalent”. An alternative is to simply lump the mass at the nodal location to
result in a lumped mass matrix. Due to its simplicity, lumped mass matrix is not discussed
herein.
(5.26c)
∫
By inserting and of Eqn (3.25), Eqn. (5.26) will become
(5.26d)
∫ ( )( )
By conducting the integration to Eqn. (5.26d), is obtained as
(5.26e)
The complete integrated values of [ ] for a beam element can thus be given as
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 113
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.26f)
[ ] [ ]
Now, as mentioned, to derive the eigenproblem statement for the problem, we must
express { } as a function of time and we can do this by employing separation of variable
which gives
{ } { ̂} (5.27)
Based on Eqn. (5.27) we can say that in time dimension, our { } vary in a harmonic manner
with amplitudes { ̂ } and frequencies, . Inserting Eqn. (5.27) into Eqn. (5.25) and by
conducting the differentiation in time twice would give
[ ]{ ̂ } [ ]{ ̂ } (5.28)
By collecting and by expressing (the latter is to suit earlier definition), Eqn. (5.28)
can be given as
[ ] [ ] { ̂} (5.29)
As mentioned, Eqn. (5.29) has two solutions; trivial and non-trivial. The latter is of interest
to us and this is when the determinant of the multiplying matrix is set to zero;
|[ ] [ ]|=0 (5.30)
Once essential boundary conditions are imposed, Eqn. (5.30) will yield a polynomial
characteristic equation in the forms of Eqn. (5.4) which roots would be the eigenvalues,
mathematically and square of the natural frequencies, physically. Consecutive insertion of
these roots back into Eqn. (5.29) gives the corresponding eigenvector or mode shape; the
former is a mathematical terms whilst the latter is a physical terms.
However, with Matlab, this process can automatically be carried out using the built-in
function eig(). All we need to do is to establish stiffness matrix, [ ] and mass matrix, [ ],
assemble them and impose the essential boundary conditions. The rest of the process will
be taken care by the built-in function.
|[ ] [ ]| (5.30a)
which is highlighted by the use of capital letters. The assembly process is similar to the one
outlined in Chapter 4. We are going to employ the whole procedure hence the formulation
in the next example.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 114
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
EXAMPLE 5.1
Figure E5.1 shows a cantilever beam and its properties. Herein, the beam’s natural
frequencies and the corresponding mode shapes are of interest. The results are validated
against a closed form solution.
Due to the symmetrically, element 1 and element 2 would have a similar local stiffness
matrix and local mass matrix, thus,
(E5.1)
[ ]
and
(E5.2)
[ ] [ ] [ ]
[ ]
(E5.3)
[ ]
and
[ ] (E5.4)
[ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 115
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
|
[ ] (E5.5)
|
=0
|
[ ]
|[ ]
[ ] |=0 (E5.6)
By solving Eqn. (E5.6) using Matlab command “ [ ] [ ] ”, (source code 5.1), the values
of are thus obtained as:
{ } (E5.7)
√ { } (E5.8)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 116
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
The analysis of buckling of structures, on the other hand, refers to the determination of
buckling (critical) load, and its corresponding mode shape, { }. If the compressive load
within a structure equals this buckling load, buckling will occur. In the context of ultimate
limit state design, occurrence of buckling is considered as premature failure as it prevents
the attainment of the ultimate resistances of the structure.
The determination of buckling load and its corresponding mode will be done in the same
manner as outlined previously for free vibration of beam as the analysis falls under the
same category of eigenproblem. By referring to Table 5.1, it can be seen that the process
requires the derivation of the stiffness matrix [ ] and stress stiffness matrix [ ] which can
be done by discretising the governing differential equation. Therefore, for better
understanding, it is best to start our discussion by deriving first the ODE of the problem; a
philosophy which has been and will always be upheld throughout this book.
Before we proceed with derivation of the ODE, it is worth to note that the stiffness matrix
[ ] will be the same as the one previously derived in Chapter 3 and Eqn. (5.26a).
The derivation of the ODE is basically similar to the one outlined in Chapter 3, except that
this time, we introduce a couple of constant axial loads, each at each side of the differential
element as can be seen in Figure 5.4b. Take note of the constant nature of the axial load,
evident by the fact that they are not affected by the disturbance within the differential
element (or by the varying boundary conditions). This is in contrast to the bar element
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 117
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
formulation as described in Chapter 2 where the axial load on the right side of the element
is expanded by the Taylor expansion.
Another point to consider is the deformed shape of the differential element as shown in
Figure 5.4b which was absent in our previous discussions. This consideration is necessary to
allow for the moment contributed by the axial load. By considering the geometry, if the
total moment is taken about point and if the angle is assumed small, the axial load on the
right side of the differential element would have a lever arm of and would be
contributing a moment of .
Having established all the relevant differences, we are all set to derive the ODE for the
problem.
∑ (5.31)
∑ (5.32)
∑ (5.33)
which yield
(5.34)
(5.35)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 118
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.36)
(5.37)
To arrive at Eqn. (5.37), higher order terms have been assumed as insignificant thus
omitted. By differentiating Eqn. (5.37) once then inserting it into Eqn. (5.36) gives
(5.38)
Eqn. (5.38) is the differential equation of the beam in terms of both moment force and
displacement. But since our FEM discussion focuses on displacement-based formulation, we
need to express the PDE completely in terms of displacement. This can be done by
employing the constitutive equation which relates the curvature of the beam with the
moment force given as
(5.39)
where is the Young’s modulus of the material and is the second moment of area of the
beam’s cross-section. Together, they are known as the flexural stiffness of the beam, .
By differentiating Eqn. (5.39) twice and inserting into Eqn. (5.38), we obtain
(5.40)
Eqn. (5.40) is the ODE for the bending problem of a beam with constant axial load and is yet
a buckling statement. To get the latter, under the argument of eigenproblem, we will
discuss the solution of the homogenous part of the equation only, thus
(5.41)
where now is treated as unknown and termed as the buckling load. Similar to free
vibration of beam, since eigenproblems do not involve with “loading”, Eqn. (5.41) does not
require any specification of the force (natural) boundary condition. All it needs are the
essential boundary conditions which similar to those described for free vibration of beam
(Eqns. (5.16) to (5.19)).
Having established the beam’s bucking ODE, we are now all set to discuss its discretization
by FEM.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 119
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Like in free vibration of beam, the discretization process begins with the provision of the
interpolation function
(5.42a)
or in component forms as
(5.42b)
(5.43a)
or in component forms as
( ) ( ) (5.43b)
Having established the ODE in terms of shape functions and dofs, we then multiply Eqn.
(5.43b) with weight functions, consecutively and integrate the inner product so as to obtain
the discretised equation.
Thus
( ) ( ) (5.44)
∫ ( )
Next, we conduct integration by parts (IBP) to both terms in Eqn. (5.44); twice to the first
and once to the second. As argued for free vibration, such integrations are no longer
conducted to induce natural (force) boundary conditions as this is an eigenproblem but to
optimize on the continuity relaxation only. By conducting the IBP gives
(5.45)
∫ ∫
As can be seen, while the first integral term is familiar to us from the discussion of beam
bending in Chapter 3 which is the stiffness matrix, the second integral term is herein termed
as stress stiffness matrix.
[ ] [ ] { } (5.46)
where [ ] is the stiffness matrix of the beam (similar to Eqn. 3.47) and [ ] is termed as the
stress stiffness matrix of the beam. These matrices can be given as
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 120
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
(5.47a)
[ ] ∫
(5.47b)
[ ] ∫
For demonstration purpose the derivation, of is shown below.
(5.48)
( ) ( )
∫ ∫
(5.49)
∫ ( )( )
Finally, by conducting the integration, is numerically obtained as
(5.50)
The complete integrated value of the stress stiffness matrix, [ ] for a beam element can
thus be given as
(5.51)
[ ] [ ]
There will be two solutions for Eqn. (5.46) either { } which is the trivial solution or the
following determinant is equalled to zero which is the non-trivial solution hence the solution
of interest.
|[ ] [ ]| (5.52a)
Eqn. (5.52) is the eigenproblem for the buckling problem of beam. Once essential boundary
conditions are imposed, Eqn. (5.52a) will yield a polynomial characteristic equation in the
forms of Eqn. (5.4) which roots would be the eigenvalues, mathematically and the buckling
load, physically. Consecutive insertion of these roots back into Eqn. (5.46) gives the
corresponding eigenvector or buckling mode { }; the former is a mathematical terms whilst
the latter is a physical terms.
However, with Matlab, this process can automatically be carried out using the built-in
function eig(). All we need to do is to establish stiffness matrix, [ ] and stress stiffness
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 121
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
matrix, [ ], assemble them and impose the essential boundary conditions. The rest of the
process will be taken care by the built-function. An assembled equation would be
|[ ] [ ]| (5.52b)
which is highlighted by the use of capital letters. The assembly process is similar to the one
outlined in Chapter 4. We are going to employ the whole procedure hence the FEM buckling
formulation in the next example.
EXAMPLE 5.2
Figure E5.2 shows a beam-column with pinned at both ends. The material properties and
the length of the element are similar with Example 5.1. The buckling loads and the buckling
modes are of interest. Results are validated against closed form solution.
Since the material and the length of element is similar, [ ] is obtain from Eqn. (E.5.3). All we
need to provide afresh is the global stress stiffness matrix. We begin by providing the local
stress stiffness matrix for each element. However like in Example 5.1, due to the
symmetrically, element 1 and element 2 would have a similar local stress stiffness matrix,
thus,
(E5.9)
[ ] [ ] [ ]
[ ] (E5.10)
[ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 122
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
|
[ ] (E5.11)
|
=0
|
[ ]
|[ ]
[ ] |=0 (E5.12)
By solving Eqn. (E5.12) using Matlab command “ [ ][ ] ”, (source code 5.1), the
values of are thus obtained as:
{ } (E5.13)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 123
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Figure 5.6: The first five buckling modes of a column with pinned at both ends.
Previous sub-sections detailed the eigenproblem formulation for free vibration of bar and
beam as well as buckling of beam. For a frame system, similar to the construction of the
stiffness matrix of beam-column element (as detailed in Subsection 4.2.1 and Eqn. (4.18),
the mass matrix of the beam-column can also be obtained by superposing the beam’s mass
matrix (Eqn. (5.26f)) and the bar’s mass matrix (A5.19). This can be given as (note that, the
matrix is primed so as to distinguish them from their elemental)
(A5.53)
[ ]
[ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 124
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Having established the beam-column’s mass matrix as given by Eqn. (A5.53) whereas the
beam column stiffness matrix is already known (as given by Eqn. (4.18)), the discussion on
free vibration of a frame system would just be an extension of what have been discussed; all
we need to do is to insert Eqns. (4.18) and (A5.53) into Eqns. (5.30) and (5.52) which are
derived for local frame and transform them to their corresponding global equation. Similar
process as outlined in Chapter 4 applies where entities are multiplied accordingly by
transformation matrix [ ] of Eqn. (4.25). Once transformed, the elemental matrices are
assembled and after the imposition of the essential boundary conditions, the equation can
be solved by using Matlab command eig() to obtain the eigenvalues (i.e. natural
frequencies) and the eigenvectors (i.e. mode shapes) for the plane frame.
Accordingly the elemental global eigenproblem statement for free vibration of beam can be
given as;
|[ ] [ ]|=0 (5.53)
where
[ ] [ ] [ ][ ] (5.54a)
[ ] [ ] [ ][ ] (5.54b)
Note that, the primed matrices, [ ] and [ ] are actually the matrices given by Eqns.
(A5.53) and (4.18), respectively so as to distinguish them from their elemental global
counterparts. The global assembled eigenproblem statement for free vibration of the frame
can thus respectively given as
|[ ] [ ]|=0 (5.57)
which is highlighted by the use of capital letters. The assembly process is similar to the one
outlined in Chapter 4. Note that, for buckling of frame, similar procedure applies. We are
going to employ the whole procedure in the next examples.
EXAMPLE 5.3
In this example, a plane frame as shown in Figure E5.3 is going to be analysed. The natural
frequencies and the corresponding mode shapes are of interest. Results are validated
against Cook et. al (2002).
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 125
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
Based on the data given in, due to the symmetrically, element 1 and element 2 would have
a similar local mass matrix and local mass matrix, thus,
Element 1 and 2
[ ] [ ]
[ ]
(E5.14)
[ ] [ ]
[ ]
(E5.15)
Element 3 and element 4 also would have a similar local mass matrix and local mass matrix
due to the symmetrically, thus,
Element 3 and 4
[ ] [ ]
[ ]
(E5.16)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 126
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ] [ ]
[ ]
(E5.17)
The corresponding elemental global stiffness matrix and global mass matrix can be
determined using Eqn. (5.54a) and Eqn. (5.54b) given as follows.
Element 1 and 2
[ ] [ ] [ ] [ ][ ]
[ ][ ]
[ ]
[ ]
(E5.18)
and
[ ] [ ] [ ] [ ][ ]
[ ][ ]
[ ] (E5.19)
[ ]
Element 3 and 4
[ ] [ ] [ ] [ ][ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 127
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
[ ][ ]
[ ]
[ ]
(E5.20)
and
[ ] [ ] [ ] [ ][ ]
[ ][ ]
[ ]
(E5.21)
[ ]
Having established the elemental global stiffness for each element, the assembled global
stiffness matrix[ ], and global mass matrix, [ ] is thus given as
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 128
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
|
[ ]
|
[ ]
(E5.22)
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 129
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
By imposing the essential boundary conditions ( ), the assembled global equilibrium equation is reduced to
|
[ ]
(E5.23)
|
[ ]
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 130
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
By solving Eqn. (E5.23) using Matlab command “ [ ] [ ] ”, (source code 5.3), the
values of are thus obtained as:
(E5.24)
{ }
(E5.25)
√ in rad/sec
{ }
Or
(E5.26)
in Hz
{ }
Table 5.2: Comparison of values between FEM and Cook et. al. (2002) (50 Elements)
1st Mode 2nd Mode 3rd Mode 4th Mode 5th Mode
FEM
Cook et. al
The corresponding mode shapes of the plane frame are shown in Figure E5.3a.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 131
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 132
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 133
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
SOURCE CODES
%Input
E=200e6; %N/m^2
b=0.2; %m
h=0.2; %m
A=b*h; %m^2
I=(b*h^3)/12; %m^4
rho=76; %kg/m^3
L1=2; %m
L2=2; %m
% Create Stifness
klocal1=[(12*E*I/L1^3) (6*E*I/L1^2) -(12*E*I/L1^3) (6*E*I/L1^2);
(6*E*I/L1^2) (4*E*I/L1) -(6*E*I/L1^2) (2*E*I/L1);
-(12*E*I/L1^3) -(6*E*I/L1^2) (12*E*I/L1^3) -(6*E*I/L1^2);
(6*E*I/L1^2) (2*E*I/L1) -(6*E*I/L1^2) (4*E*I/L1)];
m2=rho*A*L2;
kmass2=(m2/420)*[156 22*L2 54 -13*L2;
22*L2 4*L2^2 13*L2 -3*L2^2;
54 13*L2 156 -22*L2;
-13*L2 -3*L2^2 -22*L2 4*L2^2];
% Assemble
Kglobal=zeros(6,6);
Kglobal(1:4,1:4)=Kglobal(1:4,1:4)+klocal1;
Kglobal(3:6,3:6)=Kglobal(3:6,3:6)+klocal2;
KG=Kglobal;
KMASS=zeros(6,6);
KMASS(1:4,1:4)=KMASS(1:4,1:4)+kmass1;
KMASS(3:6,3:6)=KMASS(3:6,3:6)+kmass2;
%Impose BC
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
KMASS(2,:)=[];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 134
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
KMASS(:,2)=[];
KMASS(1,:)=[];
KMASS(:,1)=[];
% Solve Eigenvalue
[eigVe,eigVal]=eig(Kglobal,KMASS);
eigValue=diag(eigVal)
Freq = sqrt(eigValue) % circular freq (rad/sec)
fcycle = Freq/(2*pi); % cyclic freq (Hertz; cycles/sec)
5.2 Buckling
clc;clear all;
%Input
E=200e6; %N/m^2
b=0.2; %m
h=0.2; %m
A=b*h; %m^2
I=(b*h^3)/12; %m^4
L1=2; %m
L2=2; %m
P=1; %N
%Calculate Stifness
klocal1=[(12*E*I/L1^3) (6*E*I/L1^2) -(12*E*I/L1^3) (6*E*I/L1^2);
(6*E*I/L1^2) (4*E*I/L1) -(6*E*I/L1^2) (2*E*I/L1);
-(12*E*I/L1^3) -(6*E*I/L1^2) (12*E*I/L1^3) -(6*E*I/L1^2);
(6*E*I/L1^2) (2*E*I/L1) -(6*E*I/L1^2) (4*E*I/L1)];
%Assemble
Kglobal=zeros(6,6);
Kglobal(1:4,1:4)=Kglobal(1:4,1:4)+klocal1;
Kglobal(3:6,3:6)=Kglobal(3:6,3:6)+klocal2;
KSTRESS=zeros(6,6);
KSTRESS(1:4,1:4)=KSTRESS(1:4,1:4)+kstress1;
KSTRESS(3:6,3:6)=KSTRESS(3:6,3:6)+kstress2;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 135
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
%Impose BC
Kglobal(5,:)=[];
Kglobal(:,5)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
KSTRESS(5,:)=[];
KSTRESS(:,5)=[];
KSTRESS(1,:)=[];
KSTRESS(:,1)=[];
%Solve Eigenvalue
[eigVe,eigVa]=eig(Kglobal,-KSTRESS);
% or
Val=eig(Kglobal,KSTRESS);
Pcr=Val(1,1);
% Input
b = 0.1; % width (m)
h = 0.1; % height (m)
A = b*h; % Area (m^2)
I = b*h^3/12; % Second moment of area (m^4)
mass = 7860; % Density (kg/m^2)
E=200e9; % Young's Modulus (Pa)
L1=1.5; % Length of Element 1 (m)
L2=1.5; % Length of Element 2 (m)
L3=1.0; % Length of Element 3 (m)
L4=1.0; % Length of Element 4 (m)
% Calculate Stifness
A1=A;
I1=I;
klocal1=[(A1*E/L1) 0 0 -(A1*E/L1) 0 0;
0 (12*E*I1/L1^3) (6*E*I1/L1^2) 0 -(12*E*I1/L1^3) (6*E*I1/L1^2);
0 (6*E*I1/L1^2) (4*E*I1/L1) 0 -(6*E*I1/L1^2) (2*E*I1/L1);
-(A1*E/L1) 0 0 (A1*E/L1) 0 0;
0 -(12*E*I1/L1^3) -(6*E*I1/L1^2) 0 (12*E*I1/L1^3) -(6*E*I1/L1^2);
0 (6*E*I1/L1^2) (2*E*I1/L1) 0 -(6*E*I1/L1^2) (4*E*I1/L1)];
A2=A;
I2=I;
klocal2=[(A2*E/L2) 0 0 -(A2*E/L2) 0 0;
0 (12*E*I2/L2^3) (6*E*I2/L2^2) 0 -(12*E*I2/L2^3) (6*E*I2/L2^2);
0 (6*E*I2/L2^2) (4*E*I2/L2) 0 -(6*E*I2/L2^2) (2*E*I2/L2);
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 136
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
-(A2*E/L2) 0 0 (A2*E/L2) 0 0;
0 -(12*E*I2/L2^3) -(6*E*I2/L2^2) 0 (12*E*I2/L2^3) -(6*E*I2/L2^2);
0 (6*E*I2/L2^2) (2*E*I2/L2) 0 -(6*E*I2/L2^2) (4*E*I2/L2)];
A3=A;
I3=I;
klocal3=[(A3*E/L3) 0 0 -(A3*E/L3) 0 0;
0 (12*E*I3/L3^3) (6*E*I3/L3^2) 0 -(12*E*I3/L3^3) (6*E*I3/L3^2);
0 (6*E*I3/L3^2) (4*E*I3/L3) 0 -(6*E*I3/L3^2) (2*E*I3/L3);
-(A3*E/L3) 0 0 (A3*E/L3) 0 0;
0 -(12*E*I3/L3^3) -(6*E*I3/L3^2) 0 (12*E*I3/L3^3) -(6*E*I3/L3^2);
0 (6*E*I3/L3^2) (2*E*I3/L3) 0 -(6*E*I3/L3^2) (4*E*I3/L3)];
A4=A;
I4=I;
klocal4=[(A4*E/L4) 0 0 -(A4*E/L4) 0 0;
0 (12*E*I4/L4^3) (6*E*I4/L4^2) 0 -(12*E*I4/L4^3) (6*E*I4/L4^2);
0 (6*E*I4/L4^2) (4*E*I4/L4) 0 -(6*E*I4/L4^2) (2*E*I4/L4);
-(A4*E/L4) 0 0 (A4*E/L4) 0 0;
0 -(12*E*I4/L4^3) -(6*E*I4/L4^2) 0 (12*E*I4/L4^3) -(6*E*I4/L4^2);
0 (6*E*I4/L4^2) (2*E*I4/L4) 0 -(6*E*I4/L4^2) (4*E*I4/L4)];
mass2=mass;
cmass2=(mass2*A2*L2/420)*[140 0 0 70 0 0;
0 156 22*L2 0 54 -13*L2;
0 22*L2 4*L2^2 0 13*L2 -3*L2^2;
70 0 0 140 0 0;
0 54 13*L2 0 156 -22*L2;
0 -13*L2 -3*L2^2 0 -22*L2 4*L2^2];
mass3=mass;
cmass3=(mass3*A3*L3/420)*[140 0 0 70 0 0;
0 156 22*L3 0 54 -13*L3;
0 22*L3 4*L3^2 0 13*L3 -3*L3^2;
70 0 0 140 0 0;
0 54 13*L3 0 156 -22*L3;
0 -13*L3 -3*L3^2 0 -22*L3 4*L3^2];
mass4=mass;
cmass4=(mass4*A4*L4/420)*[140 0 0 70 0 0;
0 156 22*L4 0 54 -13*L4;
0 22*L4 4*L4^2 0 13*L4 -3*L4^2;
70 0 0 140 0 0;
0 54 13*L4 0 156 -22*L4;
0 -13*L4 -3*L4^2 0 -22*L4 4*L4^2];
% Transformation matrix
c=cos(theta1);
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 137
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
s=sin(theta1);
T1=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal1=T1'*klocal1*T1;
Mmass1=T1'*cmass1*T1;
c=cos(theta2);
s=sin(theta2);
T2=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal2=T2'*klocal2*T2;
Mmass2=T2'*cmass2*T2;
c=cos(theta3);
s=sin(theta3);
T3=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal3=T3'*klocal3*T3;
Mmass3=T3'*cmass3*T3;
c=cos(theta4);
s=sin(theta4);
T4=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal4=T4'*klocal4*T4;
Mmass4=T4'*cmass4*T4;
KGG=Kglobal;
MGG=Mglobal;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 138
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
%Impose BC
Kglobal(14,:)=[];
Kglobal(:,14)=[];
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
Mglobal(14,:)=[];
Mglobal(:,14)=[];
Mglobal(2,:)=[];
Mglobal(:,2)=[];
Mglobal(1,:)=[];
Mglobal(:,1)=[];
% Solve Eigenvalue
[eigVector,eigValue]=eig(Kglobal,Mglobal);
eigValue=diag(eigValue);
Freq = sqrt(eigValue) % circular freq (rad/sec)
fcycle = Freq/(2*pi) % cyclic freq (Hertz; cycles/s
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 139
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
CHAPTER 6
6.1 INTRODUCTION
Derivation of the bar’s PDE of motion has been given in Section A5.2.1. We are not going to
repeat the procedure but to give directly the PDE as (previously given by Eqn. Eqn. (A5.6)
(6.6)
( )
However, although we have discretised this PDE in Section A5.2.2, but for completeness, we
are going to detail the discretization all over again, this time with the existence of the
forcing terms i.e. ( ). As a reminder, in previous discretization, this forcing term was
omitted because we were considering the homogenous solution only (eigenproblem).
Before we proceed, below are the natural and essential boundary conditions of the problem
(previously given by Eqns. (2.9a) to (2.9d)). However, since this is a dynamic analysis, there
is possibility for the boundary conditions to vary with time, thus
( ) (6.7a)
| ( )
( )
| ( )
(6.7b)
| ( ) (6.8c)
| ( ) (6.9d)
Note that the sign convention for the natural (force) boundary conditions above is based on
the assumption that the boundary conditions are the reactions at support hence the
opposite directions to the internal forces. Since Eqn. (6.6) is a 2nd order ODE in , two
boundary conditions out of the four given above must be known in prior so as to have a
well-posed problem. Also, since Eqn. (6.6) consists of second order time derivatives, two
initial conditions must be known. We are going to detail on this later during the discussion
of time integration by finite difference method.
Like previous elements, the discretization process begins with the provision of the
interpolation function (for liner bar element)
( ) (6.10a)
or in component forms as
( ) (6.10b)
where and are the shape functions and degree of freedoms as previously given in
Chapter 2 for linear bar element (Eqn. (2.13d)).
( ) ( ) (6.11a)
( )
or component forms as
( ) ( ) (6.11b)
( )
Having established the PDE in terms of shape functions and dofs, we then multiply Eqn.
(6.11b) with weight functions, consecutively and integrate the inner product so as to obtain
the discretised equation.
Thus
(6.12)
( ) ( )
∫ ( ( ))
Next, we conduct integration by parts (IBP) to the first term. It must be noted that, no IBP is
conducted to the second term because the term is not a spatial derivative but a time
derivative. By conducting the IBP, we obtain
( ) ( ) (6.13)
∫ ∫ ∫ ( ) ( )
where ( )is the boundary terms (conditions) which can be either Eqn. (6.7a) or (6.7b) as
explained in detailed in Section 2.2.5 except that now they can vary with time, ( ). While
the first integral term of Eqn. (6.13) is familiar to us from the discussion of bar element
(static) in Chapter 2, the second term, as mentioned, deserves further explanation. In this
term, the shape functions, is taken out from the derivative since it would not involve with
the differentiation because shape functions are not function of time, but function of
only. But something must be a function of time else the second term would vanish. This
leaves us with nothing but the degree of freedoms, . So, must be a function of time
thus must involve in the differentiation as shown in Eq. (6.13). Now, by expressing the time
second derivative by a double dot, ̈ , Eq. (6.13) can be given in matrix forms as
[ ]{ } [ ]{ ̈ } { ( )} { ( )} { ( )} (6.14)
where [ ] is the stiffness matrix of the are and [ ] is termed as the equivalent mass matrix
of the ar. These matrices are already given by Eqns. (2.31b) and (A5.19), respectively.
Discussion on time-integration in solving Eqns. (6.14) will be discussed later. Next, we are
going to discuss the forced vibration analysis of beam.
Derivation of the beam’s PDE of motion has been given in Section 5.2.1. We are not going to
repeat the procedure but to give directly the PDE as (previously given as Eqn. (5.14));
(6.20)
( )
However, although we have discretised this PDE in Section 5.2.2, but for completeness, we
are going to detail the discretization all over again, this time with the existence of the
forcing terms i.e. ( ). As a reminder, in previous discretization, this forcing term was
omitted because we were considering the homogenous solution only (Eigenproblem).
Before we proceed, below are the natural and essential boundary conditions of the
problem. There are similar to the ones in Eqns. (3.11) to (3.18) but since this is a dynamic
analysis, there is possibility for the boundary conditions to vary with time.
The force (natural) boundary conditions of the beam as function of time can be given as
(6.21)
( )| ( )
(6.22)
( )| ( )
(6.23)
( )| ( )
(6.24)
( )| ( )
where ( ), ( ) are the specified end shear forces (edge transverse point loads) and
( ), ( ) are the specified end moment forces. Note that the sign convention above is
based on the assumption that the boundary conditions are the reactions at support hence
the opposite directions to the internal forces.
On the other hand, the displacement (essential) boundary conditions of the beam can be
given as function of time as;
(6.25)
( )| ( )
(6.26)
( )| ( )
( )| ( ) (6.27)
( )| ( ) (6.28)
where ( ), ( ) are the specified end rotations and ( ), ( ) are the specified end
transverse displacements. Also, since Eqn. (6.20) consists of second order time derivatives,
two initial conditions must be known. We are going to detail on this later during the
discussion on time integration by finite difference method.
Like previous elements, the discretization process begins with the provision of the beam’s
interpolation function which can be given as;
( ) (6.29)
or in component forms as
( ) (6.30)
where and are the shape functions and degree of freedoms as previously given in
Chapter 3 for Euler-Bernoulli beam.
© AIRIL YASREEN YASSIN, PhD, ERWAN HAFIZI KASIMAN, MEng
AND MOHD AL-AKBAR NOOR, MEng Page 143
LINEAR AND NONLINEAR FINITE ELEMENT ANALYSIS FOR SOLIDS AND
FLUIDS (unedited 1st draft)
2013
( ) ( ) (6.31)
or component forms as
( ) ( ) (6.32)
( )
Having established the PDE in terms of shape functions and dofs, we then multiply Eqn.
(6.32) with weight functions, consecutively and integrate the inner product so as to obtain the
discretised equation.
Thus
(6.33)
( ) ( )
∫ ( ( ))
Next, we conduct integration by parts (IBP) to the first term. No IBP is conducted to the
second term because the term is not a spatial derivative but a time derivative. In fact, the
time derivative term requires further elaboration which will be given next. But until then,
let’s conduct IBP to Eqn. (5.23) so as to obtain
( ) ( ) (6.34)
∫ ∫ ∫ ( ) ( )
where ( )is the boundary terms (conditions) which can be any two of the four of Eqns.
(6.21) to (6.28) as explained in detailed in Section 3.3 except that now they can vary with
time, ( ). While the first integral term is familiar to us from the discussion of beam bending
in Chapter 3, the second term, as mentioned, deserves further explanation. In this term, the
shape functions, is taken out from the derivative since it would not involve with the
differentiation due to the fact that the shape functions are not function of time but function
of only. But something must be a function of time else the second term would vanish. This
leaves us with nothing but the degree of freedoms, . So, must be a function of time,
thus must involve in the differetiation as shown in Eqn. (6.34). Now, by expressing the time
second derivative by a double dot, ̈ , Eq. (6.34) can be given in matrix forms as
[ ]{ } [ ]{ ̈ } { ( )} { ( )} { ( )} (6.35)
where [ ] is the stiffness matrix of the beam and [ ] is termed as the equivalent mass
matrix of the beam. These matrices are already given by Eqns. (3.47) and (5.26f),
respectively. As can be noticed, Eqn. (6.35) is exactly in similar forms as Eqn. (6.14) derived
for bar problem. This highlights that the same time-integration algorithm can be used for
both problems, in fact for all problems, provided that they are arranged in similar forms.
Discussion on time-integration in solving Eqns. (6.14) and (6.35) will be discussed next. But,
before that, we will discuss first the analysis of forced vibration for truss and frame system.
The discussion on forced vibration of a frame system would just be an extension of what
have been discussed; all we need to do is to insert Eqns. (4.18) and (A5.53) into Eqns. (6.35)
which are derived for local frame and transform them to their corresponding global
equation. Similar process as outlined in Chapter 4 applies where entities are multiplied
accordingly by transformation matrix [ ] of Eqn. (4.25). Once transformed, the elemental
matrices are assembled. Accordingly the elemental global discretized equation of forced
vibration of plane frame can be given as;
[ ]{ } [ ]{ ̈ } { ( )} (6.36)
where
[ ] [ ] [ ][ ] (6.37)
[ ] [ ] [ ][ ] (6.38)
{ ( )} [ ] { ( )} (6.39)
Note that, the primed matrices, [ ], [ ] and { ( )} are actually the matrices and vector
given by Eqns. (A5.53), (4.18) and (6.35), respectively. These are primed so as to distinguish
them from their elemental global counterparts. As a reminder, detailed explanations on
transformation are given in Sections 4.1 and 4.2.1.
Having established the elemental global equation, the assembled global discretized
equation of forced vibration of plane frame can thus be given as;
[ ]{ ̈ } [ ]{ } { ( )} (6.40)
which their assembled states are highlighted by the use of capital letters. The assembly
process is similar to the one outlined in Chapter 4.
By observing Eqn. (6.40), we should realize by now that the equation poses a new problem
which we have never encountered before that is, now we must deal with time second
derivative terms symbolized by the double dots i.e. { ̈ }. To solve this kind of problem, we
need time integration. This is discussed next.
Eqn. (6.40) involves the second derivative of the dof’s in time, expressed by { ̈ }. As a
derivative, it can be discretized, which the common practice would be, by finite difference
method. Basically there are three ways to do this;
i) Forward difference
ii) Backward difference
iii) Central difference
Despite the three available techniques, herein, we will concern only with central difference
technique. Readers who are interested to know more about the other techniques can refer
to books on finite difference method and finite element method.
(6.41)
{ ̈} { }
where refers to the time at which the problem is solved, is time of the previous
solution and is the solution just before . refers to time step taken.
(6.42)
[ ]{ } [ ]{ } { }
Eqn. (6.42) is the fully discretized equation of motion for the problem. As can be seen,
spatial dimension terms are discretized by FEM whilst time derivative term is discretized by
finite difference method or FDM.
It must be noted that, the vector of dof’s associates with the stiffness matrix (i.e. [ ]{ } )
has been chosen as known values; solved values of previous time, (i.e. { } ). Such a
selection is actually a matter of choice. As will be seen, this will ease the solution process
where the problem can be solved in an explicit manner (forward marching). However this
comes at a cost. Due to such a selection, despite the ease it provides, the process is not
always stable. Therefore, the process requires that the time step, to be smaller than the
critical time step, , else the analysis will “blow-up”. The critical time step can be
calculated as
(6.43)
where is the highest natural frequency of the system, obtained from eigenproblem
analysis discussed in the previous chapter.
(6.44)
[ ]{ } { } [ ]{ } [ ]{ } [ ]{ }
[ ]{ } { } [ ]{ } [ ]{ } [ ]{ } (6.45)
where and .
Having established Eqn. (6.45), we are now in the position to solve the problem. The straight
forward nature of Eqn. (6.45) should be obvious to us because as we can see, all the terms
on the right hand side of the equation are known values, obtained from previous analysis
(previous time step). Having everything known on the right hand side the equation, { }
now can be solved by inversing the matrix [ ] (or by employing Gauss Elimination or any
other solvers). This is best demonstrated by examples. However, before we do that, we
must discuss the initial conditions for the problem; a compulsory discussion and provision
for all dynamic (time-dependent) problems.
Examining Eqn. (6.45), we can see that, to kick start the procedure, we must provide two
known values of { } and { } . To provide these values and since we have second order
( )
derivatives in time (i.e. ), two initial conditions must be known which can either be,
displacement, { } , velocity { ̇ } or the acceleration { ̈ } . Knowing any two of these is
sufficient because the third one can be obtained consequently. As an example, for a system
at rest, { } and { ̇ } can be taken as zero (i.e. { } { ̇} . With these conditions,
{ ̈ } can be determined by solving Eqn. (6.40) as below
[ ]{ ̈ } [ ]{ } { } (6.46)
or
[ ]{ ̈ } { } (6.47)
thus
{ ̈} [ ] { } (6.48)
Based on these initial conditions, values of { } and { } at the first time step (values to
kick start the recursion), for the case of a system at rest prior to the imposition of loading,
can be given as
{ } { } (6.49)
{ } { } { ̇} { ̈} (6.50)
{ } { ̈} (6.51)
Having established the values of { } and { } for the first time step (to kick start the
recursion), we are now all set for some examples.
EXAMPLE 6.2
Let’s solve the plane frame problem of EXAMPLE 5.3. This time, the frame is subjected to a
time-varying point load as shown in Figure E6.3
[ ] and [ ] are obtained from Eqn. (4.18) and (A5.53), respectively which transformation
and assembly have been discussed in EXAMPLE 5.3. All we need to do now is to provide the
global displacement and load vector. Since the external point load is inserted directly into
the assembled global load vector, the global load vector, { } can be given as
(E6.1)
{ }
{ }
[ ]{ }
̈
̈
(E6.2)
̈
̈
̈
̈
̈
̈
̈
̈
̈
̈
̈ { }
[ ] ̈
{ ̈ }
By imposing the essential boundary conditions ( ), the assembled global equilibrium equation is reduced to
[ ]{ }
̈
̈ (E6.3)
̈
̈
̈
̈
̈
̈
̈
̈
{ }
[ ] ̈
{ ̈ }
for :
[ ]{ ̈ } { } (E6.4)
{ }
[ ]
̈
̈
̈
̈
̈
̈
̈
̈
̈
̈
{ }
[ ] ̈
{ ̈ }
̈
̈
̈
̈
̈
̈ (E6.5)
̈
̈
̈
̈
̈ { }
{ ̈ }
II. solve { }
(E6.6)
{ } { } { ̈}
{ } { }
{ } { }
(E6.7)
[ ]{ } { } ([ ] [ ]) { } [ ]{ }
Let , , and as
[ ]
( )
[ ]
[ ]
(E6.8)
[ ] [ ]
[ ]
[ ]
[ ]
(E.6.9)
[ ]
( )
[ ]
[ ]
(E6.10)
{ } { } { } { } (E6.11)
{ } (E6.12)
{ }
for :
by referring Eqn. (6.11), subs { } with { } and { } with { } , yield the following form
{ } { } { } { } (E6.13)
solve for { }
{ } (E6.14)
{ }
for :
by referring Eqn. (6.13), subs { } with { } and { } with { } , yield the following form
{ } { } { } { } (E6.15)
solve for { }
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 157
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
{ } (E6.16)
{ }
for :
by referring Eqn. (6.15), subs { } with { } and { } with { } , yield the following form
{ } { } { } { } (E6.17)
solve for { }
{ } (E6.18)
{ }
Figure E6.4 shows the vibration (rotation) of the frame taken 1 m from the roller support.
The results can be validated by comparing Figure E6.4 with Figure 11.18-2(d), page 441 of
Cook et.al (2002).
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 158
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
Figure E6.4: vibration (rotation) of the frame taken 1 m from the roller support.
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 159
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
SOURCE CODE
Example 6.2
% Input
b = 0.1; % width (m)
h = 0.1; % height (m)
A = b*h; % Area (m^2)
I = b*h^3/12; % Second moment of area (m^4)
mass = 7860; % Density (kg/m^2)
E=200e9; % Young's Modulus (Pa)
L1=1.5; % Length of Element 1 (m)
L2=1.5; % Length of Element 2 (m)
L3=1.0; % Length of Element 3 (m)
L4=1.0; % Length of Element 4 (m)
% Calculate Stifness
A1=A;
I1=I;
klocal1=[(A1*E/L1) 0 0 -(A1*E/L1) 0 0;
0 (12*E*I1/L1^3) (6*E*I1/L1^2) 0 -(12*E*I1/L1^3) (6*E*I1/L1^2);
0 (6*E*I1/L1^2) (4*E*I1/L1) 0 -(6*E*I1/L1^2) (2*E*I1/L1);
-(A1*E/L1) 0 0 (A1*E/L1) 0 0;
0 -(12*E*I1/L1^3) -(6*E*I1/L1^2) 0 (12*E*I1/L1^3) -(6*E*I1/L1^2);
0 (6*E*I1/L1^2) (2*E*I1/L1) 0 -(6*E*I1/L1^2) (4*E*I1/L1)];
A2=A;
I2=I;
klocal2=[(A2*E/L2) 0 0 -(A2*E/L2) 0 0;
0 (12*E*I2/L2^3) (6*E*I2/L2^2) 0 -(12*E*I2/L2^3) (6*E*I2/L2^2);
0 (6*E*I2/L2^2) (4*E*I2/L2) 0 -(6*E*I2/L2^2) (2*E*I2/L2);
-(A2*E/L2) 0 0 (A2*E/L2) 0 0;
0 -(12*E*I2/L2^3) -(6*E*I2/L2^2) 0 (12*E*I2/L2^3) -(6*E*I2/L2^2);
0 (6*E*I2/L2^2) (2*E*I2/L2) 0 -(6*E*I2/L2^2) (4*E*I2/L2)];
A3=A;
I3=I;
klocal3=[(A3*E/L3) 0 0 -(A3*E/L3) 0 0;
0 (12*E*I3/L3^3) (6*E*I3/L3^2) 0 -(12*E*I3/L3^3) (6*E*I3/L3^2);
0 (6*E*I3/L3^2) (4*E*I3/L3) 0 -(6*E*I3/L3^2) (2*E*I3/L3);
-(A3*E/L3) 0 0 (A3*E/L3) 0 0;
0 -(12*E*I3/L3^3) -(6*E*I3/L3^2) 0 (12*E*I3/L3^3) -(6*E*I3/L3^2);
0 (6*E*I3/L3^2) (2*E*I3/L3) 0 -(6*E*I3/L3^2) (4*E*I3/L3)];
A4=A;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 160
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
I4=I;
klocal4=[(A4*E/L4) 0 0 -(A4*E/L4) 0 0;
0 (12*E*I4/L4^3) (6*E*I4/L4^2) 0 -(12*E*I4/L4^3) (6*E*I4/L4^2);
0 (6*E*I4/L4^2) (4*E*I4/L4) 0 -(6*E*I4/L4^2) (2*E*I4/L4);
-(A4*E/L4) 0 0 (A4*E/L4) 0 0;
0 -(12*E*I4/L4^3) -(6*E*I4/L4^2) 0 (12*E*I4/L4^3) -(6*E*I4/L4^2);
0 (6*E*I4/L4^2) (2*E*I4/L4) 0 -(6*E*I4/L4^2) (4*E*I4/L4)];
mass2=mass;
cmass2=(mass2*A2*L2/420)*[140 0 0 70 0 0;
0 156 22*L2 0 54 -13*L2;
0 22*L2 4*L2^2 0 13*L2 -3*L2^2;
70 0 0 140 0 0;
0 54 13*L2 0 156 -22*L2;
0 -13*L2 -3*L2^2 0 -22*L2 4*L2^2];
mass3=mass;
cmass3=(mass3*A3*L3/420)*[140 0 0 70 0 0;
0 156 22*L3 0 54 -13*L3;
0 22*L3 4*L3^2 0 13*L3 -3*L3^2;
70 0 0 140 0 0;
0 54 13*L3 0 156 -22*L3;
0 -13*L3 -3*L3^2 0 -22*L3 4*L3^2];
mass4=mass;
cmass4=(mass4*A4*L4/420)*[140 0 0 70 0 0;
0 156 22*L4 0 54 -13*L4;
0 22*L4 4*L4^2 0 13*L4 -3*L4^2;
70 0 0 140 0 0;
0 54 13*L4 0 156 -22*L4;
0 -13*L4 -3*L4^2 0 -22*L4 4*L4^2];
% Transformation matrix
c=cos(theta1);
s=sin(theta1);
T1=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal1=T1'*klocal1*T1;
Mmass1=T1'*cmass1*T1;
c=cos(theta2);
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 161
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
s=sin(theta2);
T2=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal2=T2'*klocal2*T2;
Mmass2=T2'*cmass2*T2;
c=cos(theta3);
s=sin(theta3);
T3=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal3=T3'*klocal3*T3;
Mmass3=T3'*cmass3*T3;
c=cos(theta4);
s=sin(theta4);
T4=[c s 0 0 0 0;
-s c 0 0 0 0;
0 0 1 0 0 0;
0 0 0 c s 0;
0 0 0 -s c 0;
0 0 0 0 0 1;];
Kglobal4=T4'*klocal4*T4;
Mmass4=T4'*cmass4*T4;
KGG=Kglobal;
MGG=Mglobal;
%Impose BC
Kglobal(14,:)=[];
Kglobal(:,14)=[];
Kglobal(2,:)=[];
Kglobal(:,2)=[];
Kglobal(1,:)=[];
Kglobal(:,1)=[];
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 162
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
Mglobal(14,:)=[];
Mglobal(:,14)=[];
Mglobal(2,:)=[];
Mglobal(:,2)=[];
Mglobal(1,:)=[];
Mglobal(:,1)=[];
% Solve Eigenvalue
[eigVector,eigValue]=eig(Kglobal,Mglobal);
eigValue=diag(eigValue);
Freq = sqrt(eigValue) % circular freq (rad/sec)
fcycle = Freq/(2*pi) % cyclic freq (Hertz; cycles/sec)
%Check deltaTmax
deltaTmax=2/max(Freq);
if deltaT <=deltaTmax
display ('deltaT smaller than critical time: Pass!')
else
display ('deltaT bigger than critical time: Fail!')
end
P=100000;
Fglobal=zeros(12,1);
Fglobal(11,1)=P;
Acc=Mglobal\Fglobal;
MLHS=(a0*Mglobal);
Ut=zeros(12,1);
Utminus1=Ut+a3*(Acc);
% Saving Data
DataTime(1) =0;
DataForces(1)=P;
Result(:,1) =Ut;
time=(i-1)*deltaT;
if time <0.01
P=100000;
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 163
LINEAR AND NONLINEAR FINITE ELEMENT 2013
ANALYSIS FOR SOLIDS AND FLUIDS (unedited 1st
draft)
else
P=0;
end
Fglobal(11,1)=P;
RHS=Fglobal-((Kglobal-a2*Mglobal)*Ut)-(a0*Mglobal)*Utminus1;
Utplus1=MLHS\RHS;
Utminus1=Ut;
Ut=Utplus1;
% Save Result
DataTime(i) =time;
DataForces(i) =P;
Result(:,i) =Utplus1;
end
%--------------------------------------------------------------------------
% Plot Tip Displacement vs Time
%--------------------------------------------------------------------------
© AIRIL YASREEN YASSIN, PhD AND MOHD AL-AKHBAR NOOR, MEng Page 164
LINEAR AND NONLINEAR FINITE ELEMENT FOR 2013
SOLIDS AND FLUIDS
SCALAR ELEMENT
HEAT TRANSFER
7. INTRODUCTION
This chapter marks the beginning of the discussion on continuum elements hence
continuum mechanics. Whilst previous chapters mainly discussed line elements, herein we
are going to discuss the first type of continuum element that is scalar element.
Scalar element is an element which node has only one degree of freedom (dof). It is
employed in various physical problems such as heat transfer, potential flow, groundwater
flow, electrostatics and magnetostatics. Despite its various applications, herein, for
demonstration purposes on the use of scalar element and its corresponding FEM
formulation, steady heat transfer problem is considered.
Heat transfer analysis concerns with the determination of temperature distribution within a
body due to internal heat generation and temperature differences (as well external flux,
convection and radiation) at the boundaries.
Since it is customary in this book to start a discussion from first principle, we begin our
discussion by deriving the partial differential equation (PDE) of the problem. We limit our
derivation to two-dimensional only.
The PDE can be derived by employing the conservation of energy principle to the differential
element as shown in Figure 7.1.
As shown in the figure, the dependent variables to be considered are the heat flux in x-
direction, and in y-direction, . Similar to previous chapters, the variables are expanded
by Taylor series at all sides (surfaces).
The conservation of energy principle requires that the time rate of change of internal energy
inside the differential element must be equalled to the net heat flowing into the differential
element due to conduction plus the heat generated inside the differential element.
Next, the determination of the net heat flow can be done by considering first the net heat
flow in each direction.
In x-direction, by balancing terms on the right and left sides of the differential element, we
obtain;
(7.2)
( )
(7.3)
( )
Having established the net heat flow in both directions, the net heat flowing into the
differential element due to conduction through its surface can thus be given as
Finally, if is the rate of heat generation per unit volume, for the differential element, the
heat generated inside the element can be given as
The principle of energy conservation requires Eqn. (7.1) to be balanced Eqns. (7.4) and (7.5)
thus;
(7.6)
(7.7)
Eqn. (7.7) describes the problem in terms of heat fluxes ( , ) as the dependent variables
as well as the temperature, . To completely describe the problem in terms of temperature
alone, we employ Fourier’s Law of heat conduction where
(7.8)
and
(7.9)
(7.10)
( ) ( )
For time independent problem, hence steady heat transfer, the time derivative terms on the
left hand side ofEqn. (7.10) can be omitted thus reducing the equation to
(7.11)
( ) ( )
Equation (7.11) is the PDE of heat transfer for solid. For fluid problems, the time derivative
terms must remain and if Eulerian formulation is adopted, it must be replaced by material
derivative (i.e. { }{ } where { }is the velocity vector and { } { }) which
discussion will be given later during the discussion of fluid dynamic. Also, for heat transfer in
fluid, internal energy due to fluid viscosity must be included. For simplicity and due to its
introductory nature, all these are not considered herein; only the steady heat transfer
problem for solid as given by Eqn. (7.11) is considered instead. Readers who are interested
to know more should consult comprehensive text on heat transfer and FEM elsewhere.
(7.12)
{ }[ ]{ }
or
{ } [ ]{ } (7.13)
where
(7.14)
[ ] [ ]
Such representation is convenient because as we are going to see later in the derivations of
plane stress and fluid elements, some of their terms will resemble Eqn. (7.13).
Like other PDEs, the heat transfer PDE as given by Eqn. (7.11) (or 7.13) must be
supplemented by boundary condition equations so as to have a well-posed problem. There
are two types of boundary conditions; Newmann (natural) and Dirichlet (essential) boundary
conditions.
For general heat transfer problem, Newmann (natural) boundary conditions can be either
(or combination of) specified flux, convection or/and radiation. However, for simplicity, only
specified flux is considered herein.
i. in x-direction
(7.15)
( | )
ii. in y-direction
(7.16)
( | )
where, and are the specified (known) flux whilst , and are the components of
the unit normal vector of the surface under consideration. Symbol | means evaluated at
x-coordinate of the boundary. Same goes to | .
It can be seen later that the secondary terms produced by the integration by parts
conducted on Eqn. (7.11) (or 7.13) will be in similar forms as in Eqns. (7.15) and (7.16). Due
to this, boundary equations above are also known as natural boundary conditions.
Dirichlet boundary condition requires that the temperature at the boundary where natural
conditions are unknown (to be solved) must be known and specified. Thus;
| ̅ (7.17)
| ̅ (7.18)
Having established the PDE of the problem, we are all set to discretize the equations so as to
obtain the FEM algebraic formulation. To do this, we must first derive the relevant shape
functions.
Herein, we are going to derive shape function for scalar element (heat transfer) having 4
nodes and 8 nodes.
4-NODES ELEMENT
(7.19)
Next we evaluate Eqn. (7.19) at the location of the nodes and equate the evaluated values
to the corresponding degree of freedom, , as follows.
| ( ) ( ) ( )( ) ̂
| ( ) ( ) ( )( ) ̂
(7.20)
| ( ) ( ) ( )( ) ̂
| ( ) ( ) ( )( ) ̂
By solving the simultaneous equations of Eqns. (7.20), the polynomial coefficients can be
obtained as
̂
̂ ̂
( ) (7.21)
̂ ̂
( )
̂ ̂ ̂ ̂
( )̂ ( )̂ ( )̂ ( )̂ (7.22)
(7.23)
8-NODES ELEMENT
(7.24)
where the monomials are taken from the following Pascal triangle
𝑥 𝑦
𝑥 𝑥𝑦 𝑦
𝑥 𝑦
𝑥 𝑦 𝑥𝑦
Since Eqn. (7.18) is relatively of high order, it would be efficient to discuss its shape function
derivation from a more general approach which applies to all other cases. To do this, it is
convenient to deal with matrix and vector representations. Thus, in vector forms, eqn.
(7.24) can be given as
{ } (7.25)
{ }
or
{ }{ } (7.26)
Next we evaluate Eqn. (7.26) at the location of the nodes and equate the evaluated values
to the corresponding dof, . This can be represented in matrix forms as
[ |]{ } { ̂} (7.27)
where [ |] is a 8 X 8 matrix which contains the evaluated values of the monomials and { }
is the vector of dof given as
{ ̂} {̂ ̂ ̂ ̂ ̂ ̂ ̂ ̂ } (7.28)
{ } [ |] { ̂ } (7.29)
{ }[ |] { ̂ } (7.30)
Based on Eqn. (7.30), the shape functions can be given in vector forms as
{ } { }[ |] (7.31)
By conducting the multiplication in Eqn. (7.31), individual shape function can thus be given
as
(7.32)
( ) ( )
(7.33)
( ) ( )
(7.32)
( )
(7.36)
( ) ( )
(7.37)
( )
(7.38)
(7.39)
( )
Referring to Eqns. (7.24) and (7.40), it can be observed that, for both elements, a general
representation can be given in vector forms as;
{ }{ ̂ } (7.41)
By having established the shape functions, we are all set to discretize the PDE into algebraic
equations. By inserting Eqns. (7.41) into Eqn. (7.13) we obtain
{ } [ ]{ } { }{ ̂ } (7.42)
By observing Figure 7.2 and Eqn. (7.42), we can identify that, for a 4-nodes element, we
have 4 unknown dofs, i.e. { ̂ ̂ ̂ ̂ } with only 1 equation. To obtain sufficient
number of equations, we will multiply Eqn. (7.42) with the vector of shape function { }
then integrate to produce four independent equations as required. Similar argument applies
to 8-nodes element, resulting in eight independent equations as required.
Multiplying Eqn. (7.42) with the vector of shape functions { } and integrating give
∫ ∫ { } ({ } [ ]{ } { }{ ̂ } ) (7.43)
(7.44)
∫ ∫ { } { } [ ]{ } { }{ ̂ } ∫ ∫{ } ∫[ ] { }
Rearranging gives
(7.45)
∫ ∫ { } { } [ ]{ } { }{ ̂ } ∫ ∫{ } ∫[ ] { }
Since the conduction terms are similar in forms to those to be derived for plane stress
problem; let’s call the corresponding matrix as conductance matrix [ ] where
[ ] ∫ ∫ { } { } [ ]{ } { } (7.46)
Next, let’s introduce a vector for the heat generation and call it as equivalent load vector,
{ } where
(7.47)
{ } ∫ ∫{ }
Finally, let’s introduce a vector for the boundary terms induced by the IBP and call it as
natural boundary condition vector, { } where
(7.48)
{ } ∫[ ] { }
Having established these, the discretized equation of heat transfer can thus be given as
[ ]{ ̂ } { } { } { } (7.49)
It must be noted that, since IBP is conducted, the multiplication in Eqn. (7.46) between
terms inside the integral must be carried out from left to right. To demonstrate this and to
provide example on how to build the above matrix, the determination of for 4-nodes
scalar element is shown below. Although in practice, numerical integration is employed
which detailed procedure is given in later chapter, herein analytical integration is employed
so as to allow for easy tracing of the procedure and to allow for its immediate application.
Such analytical integrations are possible herein because we limit our discussion to
rectangular domain hence rectangular elements only.
Step 1
(7.50)
{ }{ }
Step 2
(7.51)
{ }[ ]
Step 3
(7.52)
{ }
{ }
Step 4
(7.53)
{ }{ }
∫∫( ) (7.54)
∫∫( ) (7.55)
( ) ( ) ( ) ( ) (7.56)
( ) ( ) ( ) ( )
[ ]
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ]
Repeating the procedure above (Step 1 to Step 5), the complete integrated values of [ ] for
8-nodes element can be given as
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
(7.57)
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( )
[ ]
Herein, we are going to demonstrate the FEM formulation for heat transfer equations by
solving the problem as shown in Figure E7.1. For a step-by-step demonstration (hand-
calculation), only four assembled 4-nodes elements and two 8-nodes elements are used, so
as to allow for easy tracing of the procedure. However, it must be noted that such usage is
for demonstration purpose only as the result can be poor. After the step-by-step calculation,
the procedure is run using a sufficient number of elements (denser mesh). The results are
then validated against results obtained from commercial software for proof of correctness.
Figure E7.1: Properties and boundary conditions for fin heat transfer problem.
a) 4-nodes element
Figure E7.2 Arrangement of element and global dofs numbering for 4-nodes element
Due to the symmetrically, each element would have similar conductance matrix and internal
heat generation forces. Based on Eqn. 7.56, the conductance matrix is given as
[ ] [ ] [ ] [ ] [ ] (E7.1)
( )
( )
(E7.2)
{ } { } { } { } { }
( )
{( )}
The complete global equilibrium equation can be given as
[ ]{ } { }
(E7.3)
By imposing the essential boundary conditions ( ), the
assembled global equilibrium equation is reduced to
[ ]{ } { } (E7.4)
By solving Eqn. (E7.4) using Matlab command “\”,the values of the temperature, are thus
obtained as:
{ } { } (E7.5)
The obtained results are validated herein against those obtained from commercial software.
Figure E7.3 Arrangement of element and global dofs numbering for 8-nodes element
Due to the symmetrically, each element would have similar conductance matrix and internal
heat generation forces. Based on Eqn. 7.57, the conductance matrix is given as
[ ] [ ]
[ ]
(E7.6)
( )
( )
( )
( )
{ } { } (E7.7)
( )
( ) { }
( )
{ ( ) }
Since the size of an assembled stiffness would be very large when 8-nodes elements are
used, herein, reduced size of complete global equilibrium equation with boundary
conditions have been imposed, are presented ( ).
[ ]{ } { }
(E7.8)
By solving Eqn. (E7.8) using Matlab command “\”,the values of the temperature, are thus
obtained as:
(E7.9)
{ } { }
The obtained results are validated herein against those obtained from commercial software.
( ) ( ) ( ) ( )
8-nodes (2x1) 0.0019 0.0023 0.0015 0.0017
Software 0.0019 0.0023 0.0015 0.0017
Figures E7.4 and E7.5 show the contour of the temperature distribution obtained from 4-
nodes element (64 elements) and from commercial software, respectively. The former is
h1=0; % Btu/(hr-ft-F)
t1=0.1; % Thickness of element (in)
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
deltax=Lx/dx; % Width of single element
deltay=Ly/dy; % Height of single element
% Connectivity matrix
dofNo=[];
NodeNo=[];
index=0;
for i=1:dy
for j=1:dx
index=index+1;
val1=(dx+1)*(i-1)+j;
val2=(dx+1)*(i)+j;
Nd1=val1;
Nd2=val1+1;
Nd3=val2+1;
Nd4=val2;
NodeNo(index,:)=[Nd1 Nd2 Nd3 Nd4];
dofNo(index,:)=NodeNo(index,:);
end
end
%--------------------------------------------------------------------------
% Stiffness from Maple
%--------------------------------------------------------------------------
syms a b t kx ky h
klocal=subs(k1,{a,b,t,kx,ky,h},{deltax,deltay,t1,kx1,ky1,h1})
%--------------------------------------------------------------------------
% Assemble stifness matrix
%--------------------------------------------------------------------------
kglobal=zeros(TTDOF,TTDOF);
flocal=zeros(TTDOF,1);
for i=1:size(dofNo,1)
for j=1:4
dof1=dofNo(i,j);
for k=1:4
dof2=dofNo(i,k);
kglobal(dof1,dof2)=kglobal(dof1,dof2)+klocal(j,k);
end
end
end
%--------------------------------------------------------------------------
% Forces
%--------------------------------------------------------------------------
a=deltax;
b=deltay;
for i=1:size(NodeNo,1)
f1=[(Qa*a*b*t1)/4;(Qa*a*b*t1)/4;(Qa*a*b*t1)/4;(Qa*a*b*t1)/4];
for j=1:4
dof1=dofNo(i,j);
flocal(dof1,1)=flocal(dof1,1)+f1(j,1);
end
end
%--------------------------------------------------------------------------
% Impose BC
%--------------------------------------------------------------------------
% dofe=[9;8;7;4;1]; % 2x2 element
% dofe=[25;24;23;22;21;16;11;6;1]; % 4x4 element
dofe=[81;80;79;78;77;76;75;74;73;64;55;46;37;28;19;10;1];% 8x8 element
for i=1:size(dofe,1)
val1=dofe(i,1);
kglobal(val1,:)=[];
kglobal(:,val1)=[];
%--------------------------------------------------------------------------
% Solve d=k\f
%--------------------------------------------------------------------------
T=kglobal\flocal
%--------------------------------------------------------------------------
% plotting result (deflection) % 8x8 element
%--------------------------------------------------------------------------
Tori=zeros(TTDOF,1);
Tori(2:9,1)=T(1:8,1);
Tori(11:18,1)=T(9:16,1);
Tori(20:27,1)=T(17:24,1);
Tori(29:36,1)=T(25:32,1);
Tori(38:45,1)=T(33:40,1);
Tori(47:54,1)=T(41:48,1);
Tori(56:63,1)=T(49:56,1);
Tori(65:72,1)=T(57:64,1);
Zx=[];
index=0;
for i=1:dy+1
for j=1:dx+1
index=index+1;
x_val=Tori(index,1);
Zx(i,j)=x_val;
end
end
figure (1)
surf(X,Y,Zx)
title('Temperature (K)')
colorbar
clc;clear all;
%--------------------------------------------------------------------------
% Input ref pg 83 schaum's
%--------------------------------------------------------------------------
kx1=400; % Btu/(hr-ft-F)
ky1=400; % Btu/(hr-ft-F)
Qa=50;
h1=0; % Btu/(hr-ft-F)
t1=0.1; % Thickness of element (in)
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
deltax=Lx/dx; % Width of single element
deltay=Ly/dy; % Height of single element
% Connectivity matrix
dofNo=[];
NodeNo=[];
index=0;
for i=1:dy
for j=1:dx
index=index+1;
val1=2*(j-1)+1;
val2=(i-1)*((3*dx)+2);
val3=i*((3*dx)+2);
val4=j-dx;
Nd1=val1+val2;
Nd4=val1+val3;
Nd6=val3+val4;
Nd5=Nd1+1;
Nd2=Nd1+2;
Nd3=Nd4+2;
Nd7=Nd4+1;
Nd8=Nd6-1;
dof1=2*(Nd1-1)+1; dof9=2*(Nd5-1)+1;
dof2=2*(Nd1-1)+2; dof10=2*(Nd5-1)+2;
dof3=2*(Nd2-1)+1; dof11=2*(Nd6-1)+1;
dof4=2*(Nd2-1)+2; dof12=2*(Nd6-1)+2;
dof5=2*(Nd3-1)+1; dof13=2*(Nd7-1)+1;
dof6=2*(Nd3-1)+2; dof14=2*(Nd7-1)+2;
dof7=2*(Nd4-1)+1; dof15=2*(Nd8-1)+1;
dof8=2*(Nd4-1)+2; dof16=2*(Nd8-1)+2;
dofNo(index,:)=NodeNo(index,:);
end
end
%--------------------------------------------------------------------------
% Stiffness from Maple
%--------------------------------------------------------------------------
syms a b t kx ky h
klocal1=subs(klocal_raw,{a,b,t,kx,ky,h},{deltax,deltay,t1,kx1,ky1,h1})
%--------------------------------------------------------------------------
% Assemble stifness matrix
%--------------------------------------------------------------------------
kglobal=zeros(TTDOF,TTDOF);
flocal=zeros(TTDOF,1);
for i=1:size(dofNo,1)
end
%--------------------------------------------------------------------------
% UDL
%--------------------------------------------------------------------------
a=deltax;
b=deltay;
t=t1;
Q=Qa;
for i=1:size(NodeNo,1)
f1= [-Q * t * a * b / 0.12e2; -Q * t * a * b / 0.12e2; -Q * t * a * b /
0.12e2; -Q * t * a * b / 0.12e2; Q * t * a * b / 0.3e1; Q * t * a * b /
0.3e1; Q * t * a * b / 0.3e1; Q * t * a * b / 0.3e1;];
for j=1:8
dof1=dofNo(i,j);
flocal(dof1,1)=flocal(dof1,1)+f1(j,1);
end
end
%--------------------------------------------------------------------------
% Impose BC
%--------------------------------------------------------------------------
dofe=[13;12;11;10;9;6;1];% 1 element
for i=1:size(dofe,1)
val=dofe(i,1);
kglobal(val,:)=[];
kglobal(:,val)=[];
flocal(val,:)=[];
end
%--------------------------------------------------------------------------
% Solve d=k\f
%--------------------------------------------------------------------------
T=kglobal\flocal
PLANE ELASTICITY
PLANE STRESS
8. INTRODUCTION
Plane stress element is used to model thin body or structure that is subjected to in plane
loading (or boundary stresses) thus correspondingly stressed in the plane. In practical, it is
used to model shear and load bearing walls, steel web and many more.
The study of plane stress FEM formulation is important, not only for its direct application to
physical problems but also to further the study on FEM itself. For example, in the discussion
of shell elements, the formulation can be viewed as combining the plane stress element and
the plate element together. Also, in fluid dynamics, with some modifications, the plane
stress element can be used to model fluid flow.
Herein, partial differential equation (PDE) of plane stress elasticity will be first derived
followed by the FEM formulation.
The PDE can be derived by employing the conservation of linear momentum principle to the
differential element shown in Figure 8.1.
As shown in the figure, the dependent variables to be considered are the normal stresses
(i.e. , ) and the shear stresses (i.e. , ). and , are the known body forces in
x-direction and y-direction, respectively. Similar to previous chapters, the dependent
variables are expanded by Taylor series at all sides (surfaces).
∑ (8.1)
∑ (8.2)
(8.3)
∑ (( ) ) (( ) )
(8.4)
(8.5)
∑ (( ) ) (( ) )
(8.6)
Eqns. (8.4) and (8.6) are the PDEs for the plane stress problem, described in terms of
stresses as the dependent variables. In matrix forms, the equations can be given as
{ } (8.7)
{ }
(8.8)
{ } { }
{ } [ ]
[ ]{ } { } (8.9)
Eqn. (8.9) (or (8.4) and (8.6)) describes the problem in terms of stresses as the dependent
variables. Since we are focusing on the displacement-based formulation, it would be
necessary to express the equation in terms of displacement variables. This can be done by
considering the following constitutive relationship.
(8.10)
( )
( )
{ } { } [ ( )] { }
(8.11)
or
{ } [ ]{ } (8.12)
where is the Young’s (elasticity) modulus and is the Poisson’s ratio of the material.
and are the axial strain in x and y directions, respectively whilst is the shear strain.
The strains can, on the other hand, be expressed in terms of displacements by employing
the following strain-displacement relationship;
(8.13)
(8.14)
{ } { } { }
[ ]
Observe that the matrix on the right hand side of the equation above is also the transpose
of the differential operator matrix, [ ] previously defined in Eqn. (8.8). Based on this Eqn.
(8.14) can be given as;
{ } [ ] { } (8.15)
{ } [ ][ ] { } (8.16)
Finally, by inserting Eqn. (8.16) into Eqn. (8.9) the PDEs can be given in terms of
displacement variables as
[ ][ ][ ] { } { } (8.17)
Like other PDEs, the plane stress PDE given by Eqn. (8.17) (or (8.4) and (8.6)) must be
supplemented by boundary condition equations so as to have a well-posed problem. There
are two types of boundary conditions; Newmann (natural) and Dirichlet (essential) boundary
conditions.
i. in x-direction
(8.18)
ii. in y-direction
(8.19)
where, , and are the components of the unit normal vector of the surface under
consideration. It worth to note that, for rectangular domain hence rectangular elements
(8.20)
(8.21)
It can be seen later that the secondary terms produced by the integration by parts on the
weighted PDEs will be in similar forms to (8.20) and (8.21). Due to this, equations above are
also known as natural boundary conditions.
Dirichlet boundary condition requires that the displacement components at the boundary
where natural conditions are unknown (to be solved) must be known thus specified.
̅ (8.22)
̅ (8.23)
Having established the PDE of the problem, we are all set to discretize the equations so as to
obtain the FEM algebraic formulation.
8.2.1 Degree of Freedoms and Shape Functions for Plane Stress Element
In a plane stress element, two translational degree of freedoms exist at each node;
represents the nodal displacement in x-direction whilst represents the nodal
displacement in y-direction. Their arrangements in an element are shown in Figure 8.2 for 4-
nodes element and in Figure 8.3 for 8-nodes element.
For 4-nodes element, and are interpolated by the shape functions in such a way that
(8.24)
(8.25)
(8.26)
(8.27)
For 4-nodes element, the shape functions, are similar to those given by Eqn. (7.23) whilst
for 8-nodes element, they are similar to those given by Eqns. (7.32) to (7.39). Observing
Eqns. (8.24) to (8.27), it can be noticed that they can be given in vector forms as follows;
{ } [ ] (8.28)
{ }
{ } [ ] (8.29)
{ }
Observing Eqns. (8.28) and (8.29), it can be noticed that, for both elements, a general
representation can be provided which is
{ } [ ]{ ̂} (8.30)
By having established the shape functions, we are all set to discretize the PDE into algebraic
equations. By inserting Eqns. (8.30) into Eqn. (8.17) we obtain
[ ] [ ][ ] [ ]{ ̂} { } (8.31)
By observing Figure 8.2 and Eqns. (8.24) and (8.25), we can identify that, for a 4-nodes
element, we have 8 unknown dofs, i.e. { ̂ ̂ ̂ ̂ } with only 1 equation, whilst
for 8-nodes element we have 16 unknown dofs i.e. { ̂ ̂ ̂ ̂ }. To obtain
sufficient number of equations, we will multiply Eqn. (8.31) with the matrix of shape
function [ ] then integrate to produce eight independent equations as required for 4-nodes
element. Similar argument applies to 8-nodes element, resulting in sixteen independent
equations as required.
Multiplying Eqn. (8.31) with the matrix of shape functions [ ] and integrating give
∫ ∫ [ ] ([ ] [ ][ ] [ ]{ ̂} { }) (8.32)
∫ ∫ [ ] [ ] [ ][ ] [ ]{ ̂} ∫ ∫[ ] { } ∫[ ] { } (8.33)
Rearranging gives
∫ ∫ [ ] [ ] [ ][ ] [ ]{ ̂} ∫ ∫[ ] { } ∫[ ] { } (8.34)
The left hand side terms of Eqn. (8.34) can be given in matrix forms. Let’s call the
corresponding matrix as stiffness matrix [ ] where
[ ] ∫ ∫ [ ] [ ] [ ][ ] [ ] (8.35)
(8.36)
{ } ∫ ∫[ ] { }
Finally, let’s introduce a vector for the boundary terms induced by the IBP and call it as
natural boundary condition vector, { } where
(8.37)
{ } ∫[ ] { }
It can be shown that, for rectangular domain hence rectangular element (mesh), Eqn. (8.37)
is given by Eqn. (8.20) and (8.21), respectively depending on the direction and location of
evaluation.
Having established these, the discretized equation of heat transfer can thus be given as
[ ]{ ̂} { } { } { } (8.36)
Step 1
( )
[ ] [ ]
( )
[ ]
(8.37)
Step 2
( ) ( )
[ ] [ ]
[ ]
(8.38)
Step 3
( )
∫∫[ ] [ ] (8.39)
( ) ( )
(8.40)
[ ]
[ ]
Due to the very large size of the matrix, the integrated values of [ ] are not given herein but
directly provided in the source code instead.
EXAMPLE 8.1
Herein, we are going to demonstrate the FEM formulation for plane stress by solving the
cantilever beam problem as shown in Figure E8.1. For a step-by-step demonstration (hand-
calculation), only four assembled 4-nodes elements and two 8-nodes elements are used, so
as to allow for easy tracing of the procedure. However, it must be noted that such usage is
for demonstration purpose only as the result can be poor. After the step-by-step calculation,
the procedure is run using a sufficient number of elements (denser mesh). The results are
then validated against results obtained from commercial software for proof of correctness.
Figure E8.2 The arrangement of element and global dofs numbering for 4-nodes element
Due to the symmetrically, each element would have similar local stiffness matrix. Based on
Eqn. 8.??, the local stiffness matrix is given as
[ ]
[ ]
(E8.1)
and for the load vector for element 2 and element 4 given as follow
{ } { }
(E8.2)
{ }
{ }
where and . The assembled global stiffness matrix, [ ] is thus given as
[ ]
[ ]
(E8.3)
The assembled global load vector is given as
(E8.4)
{ }
{ }
{ }
[ ]{ }
(E8.5)
By imposing the essential boundary conditions ( ), the assembled global equilibrium equation is reduced
to
(E8.6)
{ }
[ ]{ }
{ } (E8.7)
{ }
The obtained results are validated herein against those obtained from commercial software.
b) 8-nodes Element
Figure E8.3 The arrangement of element and global dofs numbering for 8-nodes element
[ ] [ ]
[ ]
(E8.8)
and for the load vector for element 2 is given as follow
{ }
(E8.9)
{ }
{ }
[ ]{ } { }
(E8.10)
By solving Eqn. (E7.10) using Matlab command “\”, the values of the assembled global dof
are thus obtained as:
(E8.11)
{ }
{ }
Figures E8.4 and E8.5 show the contour of the displacement distribution obtained from 4-
nodes element potted in Matlab environment whilst Figures E8.6 and E8.7 show the contour
obtained from commercial software. As can be seen, close agreement are evident between
the two sources.
SOURCE CODE
SOURCE CODE (4-NODES ELEMENT) – SIMPLE
clc;clear all;
%--------------------------------------------------------------------------
% Input
%--------------------------------------------------------------------------
E1=200e6;% Pa (N/m)
v1=0.33; % Poison ratio
t1=0.01; % Thickness of element (m)
qy=-5000; % N
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
deltax=Lx/dx; % Width of single element
deltay=Ly/dy; % Height of single element
% Connectivity matrix
dofNo=[];
NodeNo=[];
index=0;
for i=1:dy
for j=1:dx
index=index+1;
val1=(dx+1)*(i-1)+j;
val2=(dx+1)*(i)+j;
Nd1=val1;
Nd2=val1+1;
Nd3=val2+1;
Nd4=val2;
NodeNo(index,:)=[Nd1 Nd2 Nd3 Nd4];
dof1=2*(Nd1-1)+1;
dof2=2*(Nd1-1)+2;
dof3=2*(Nd2-1)+1;
dof4=2*(Nd2-1)+2;
dof5=2*(Nd3-1)+1;
dof6=2*(Nd3-1)+2;
dof7=2*(Nd4-1)+1;
dof8=2*(Nd4-1)+2;
dofNo(index,:)=[dof1 dof2 dof3 dof4 dof5 dof6 dof7 dof8];
end
end
% Coordinate of nodes
index=0;
NodeCoor=[];
for i=1:dy+1
for j=1:dx+1
index=index+1;
xcoor=deltax*(j-1);
ycoor=deltay*(i-1);
NodeCoor(index,:)=[xcoor ycoor];
end
end
% dof to be eliminate
dofe1=[];
index=0;
for i=1:size(BCNode,1)
NdBC=BCNode(i);
ddofeli1=2*(NdBC-1)+1;
ddofeli2=2*NdBC;
index=index+1;
dofe1(index,1)=ddofeli1;
index=index+1;
dofe1(index,1)=ddofeli2;
end
dofe=sort(dofe1,'descend');
%--------------------------------------------------------------------------
% Stiffness from Maple
%--------------------------------------------------------------------------
syms a b t E v
+ t * (-(1 / a ^ 2 / b * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / b * E /
(1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) * b / 0.2e1 + t * ((1
/ a / b * E / (1 - v ^ 2) * v) + 0.1e1 / a / b * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * a * b t * a / b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 -
v / 0.2e1) / 0.6e1 - (t / a * b * E / (1 - v ^ 2)) / 0.3e1 (t * (-(1 / a ^
2 / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^
2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t / (b ^ 2) * E / (1
- v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (b ^ 2) / 0.2e1 + t * ((1 / a ^ 2
/ b * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / b * E / (1 - v ^ 2) * (0.1e1
/ 0.2e1 - v / 0.2e1)) * (a ^ 2) * b / 0.2e1 - t * E / (1 - v ^ 2) * (0.1e1
/ 0.2e1 - v / 0.2e1) -(t / a * b * E / (1 - v ^ 2)) / 0.6e1 - t * a / b * E
/ (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 (t * ((1 / a ^ 2 / b ^
2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 - t / (b ^ 2) * E / (1 - v ^
2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (b ^ 2) / 0.2e1 - (t * E / (1 - v ^ 2)
* v) / 0.2e1 (t / a * b * E / (1 - v ^ 2)) / 0.6e1 - t * a / b * E / (1 - v
^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1 (t * (-(1 / a ^ 2 / b ^ 2 * E /
(1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t * ((1 / a / b ^ 2 * E / (1 - v ^
2) * v) + 0.1e1 / a / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1)) * a) * (b ^ 2) / 0.2e1 - (t * E / (1 - v ^ 2) * v) / 0.2e1;
(t * ((1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / (b
^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t
* (-(1 / a / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / a / (b ^ 2) * E / (1 -
v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * a) * (b ^ 2) / 0.2e1 + t * (-(1 / a
^ 2 / b * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / b * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) * b / 0.2e1 + t * ((1 / a / b * E /
(1 - v ^ 2) * v) + 0.1e1 / a / b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1)) * a * b -0.2e1 / 0.3e1 * t / a * b * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1) - 0.2e1 / 0.3e1 * t * a / b * E / (1 - v ^ 2) + t * ((1
/ b ^ 2 * E / (1 - v ^ 2)) + 0.1e1 / (a ^ 2) * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * a * b (t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) *
v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1)) * (a ^ 2) / 0.2e1 + (t / b ^ 2 * E / (1 - v ^ 2) * v)) * (b ^ 2) /
0.2e1 + t * ((1 / a ^ 2 / b * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / b *
E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) * b / 0.2e1 - (t *
E / (1 - v ^ 2) * v) (t * a / b * E / (1 - v ^ 2)) / 0.6e1 - t / a * b * E
/ (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1 (t * ((1 / a ^ 2 / b ^
2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 - (t / b ^ 2 * E / (1 - v ^
2) * v)) * (b ^ 2) / 0.2e1 - t * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1) / 0.2e1 -t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) /
0.6e1 - (t * a / b * E / (1 - v ^ 2)) / 0.6e1 (t * (-(1 / a ^ 2 / b ^ 2 * E
/ (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t * ((1 / a / b ^ 2 * E / (1 - v ^
2) * v) + 0.1e1 / a / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1)) * a) * (b ^ 2) / 0.2e1 - t * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1) / 0.2e1 t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) /
0.6e1 - (t * a / b * E / (1 - v ^ 2)) / 0.3e1;
t * a / b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 - (t
/ a * b * E / (1 - v ^ 2)) / 0.3e1 (t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v ^
2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v
/ 0.2e1)) * (a ^ 2) / 0.2e1 + (t / b ^ 2 * E / (1 - v ^ 2) * v)) * (b ^ 2)
/ 0.2e1 + t * ((1 / a ^ 2 / b * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / b
klocal1=subs(klocal_raw,{a,b,E,t,v},{deltax,deltay,E1,t1,v1});
%--------------------------------------------------------------------------
% Assemble stifness matrix
%--------------------------------------------------------------------------
kglobal=zeros(TTDOF,TTDOF);
flocal=zeros(TTDOF,1);
for i=1:size(dofNo,1)
for j=1:8
for k=1:8
dof1=dofNo(i,j);
dof2=dofNo(i,k);
kglobal(dof1,dof2)=kglobal(dof1,dof2)+klocal1(j,k);
end
end
end
%--------------------------------------------------------------------------
% UDL
%--------------------------------------------------------------------------
eleNo=size(dofNo,1);
for i=1:dy
ele=dx*i;
dof_v2=dofNo(ele,4);
dof_v3=dofNo(ele,6);
flocal(dof_v2,1)=flocal(dof_v2,1)+qy*deltay/2;
flocal(dof_v3,1)=flocal(dof_v3,1)+qy*deltay/2;
end
%--------------------------------------------------------------------------
% Impose BC
%--------------------------------------------------------------------------
KGG=kglobal;
for i=1:size(dofe,1)
val=dofe(i,1);
kglobal(val,:)=0;
kglobal(:,val)=0;
kglobal(val,val)=1;
flocal(val,:)=0;
KGG(val,:)=[];
KGG(:,val)=[];
end
%--------------------------------------------------------------------------
% Solve d=k\f
%--------------------------------------------------------------------------
d=kglobal\flocal;
%--------------------------------------------------------------------------
% Show result for verification
%--------------------------------------------------------------------------
val=size(d,1);
u2=d(2*dx+1)
v2=d(2*dx+2)
u3=d(val-1)
v3=d(val)
%--------------------------------------------------------------------------
% plotting result (deflection)
%--------------------------------------------------------------------------
Zx=[];
Zy=[];
index=0;
for i=1:dy+1
for j=1:dx+1
index=index+1;
x_val=d(2*(index-1)+1,1);
y_val=d(2*index,1);
Zx(i,j)=x_val;
Zy(i,j)=y_val;
end
end
figure (1)
surf(X,Y,Zx)
title('x-displacement(m)')
colorbar
figure (2)
surf(X,Y,Zy)
colorbar
title('y-displacement(m)')
clc;clear all;
%--------------------------------------------------------------------------
% Input
%--------------------------------------------------------------------------
E1=200e6;% Pa (N/m)
v1=0.33; % Poison ratio
t1=0.01; % Thickness of element (m)
qy=-5000; % N
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
deltax=Lx/dx; % Width of single element
deltay=Ly/dy; % Height of single element
% Connectivity matrix
dofNo=[];
NodeNo=[];
index=0;
for i=1:dy
for j=1:dx
index=index+1;
val1=(dx+1)*(i-1)+j;
val2=(dx+1)*(i)+j;
Nd1=val1;
Nd2=val1+1;
Nd3=val2+1;
Nd4=val2;
NodeNo(index,:)=[Nd1 Nd2 Nd3 Nd4];
dof1=2*(Nd1-1)+1;
dof2=2*(Nd1-1)+2;
dof3=2*(Nd2-1)+1;
dof4=2*(Nd2-1)+2;
dof5=2*(Nd3-1)+1;
dof6=2*(Nd3-1)+2;
dof7=2*(Nd4-1)+1;
dof8=2*(Nd4-1)+2;
dofNo(index,:)=[dof1 dof2 dof3 dof4 dof5 dof6 dof7 dof8];
end
end
% Coordinate of nodes
index=0;
NodeCoor=[];
for i=1:dy+1
for j=1:dx+1
index=index+1;
xcoor=deltax*(j-1);
ycoor=deltay*(i-1);
NodeCoor(index,:)=[xcoor ycoor];
end
end
% dof to be eliminate
dofe1=[];
index=0;
for i=1:size(BCNode,1)
NdBC=BCNode(i);
ddofeli1=2*(NdBC-1)+1;
ddofeli2=2*NdBC;
index=index+1;
dofe1(index,1)=ddofeli1;
index=index+1;
dofe1(index,1)=ddofeli2;
end
dofe=sort(dofe1,'descend');
%--------------------------------------------------------------------------
% Stiffness from Maple
%--------------------------------------------------------------------------
syms a b t E v
0.2e1 - (t * E / (1 - v ^ 2) * v) / 0.2e1 -t / a * b * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 - (t * a / b * E / (1 - v ^ 2)) / 0.6e1
t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2)
* E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) * (b ^ 2) /
0.4e1 + (t * E / (1 - v ^ 2) * v) / 0.2e1 t / a * b * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 - (t * a / b * E / (1 - v ^ 2)) / 0.3e1
t * ((1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / (b ^ 2)
* E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) * (b ^ 2) /
0.4e1 t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1 +
(t * a / b * E / (1 - v ^ 2)) / 0.3e1 (t * (-(1 / a ^ 2 / b ^ 2 * E / (1 -
v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1
- v / 0.2e1)) * (a ^ 2) / 0.2e1 + t / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * (b ^ 2) / 0.2e1 (t * a / b * E / (1 - v ^ 2)) / 0.6e1
- t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1;
(t / a * b * E / (1 - v ^ 2)) / 0.6e1 - t * a / b * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1 (t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v
^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 -
v / 0.2e1)) * (a ^ 2) / 0.2e1 + t * ((1 / a / b ^ 2 * E / (1 - v ^ 2) * v)
+ 0.1e1 / a / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * a)
* (b ^ 2) / 0.2e1 - t * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) /
0.2e1 -(t / a * b * E / (1 - v ^ 2)) / 0.6e1 - t * a / b * E / (1 - v ^ 2)
* (0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 (t * ((1 / a ^ 2 / b ^ 2 * E / (1 - v
^ 2) * v) + 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 -
v / 0.2e1)) * (a ^ 2) / 0.2e1 - t / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1)) * (b ^ 2) / 0.2e1 + t * E / (1 - v ^ 2) * (0.1e1 /
0.2e1 - v / 0.2e1) / 0.2e1 t * a / b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v
/ 0.2e1) / 0.6e1 - (t / a * b * E / (1 - v ^ 2)) / 0.3e1 (t * (-(1 / a ^ 2
/ b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^
2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t / (b ^ 2) * E / (1
- v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (b ^ 2) / 0.2e1 (t / a * b * E /
(1 - v ^ 2)) / 0.3e1 + t * a / b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1) / 0.3e1 (t * ((1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a
^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) /
0.2e1 + t * (-(1 / a / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / a / (b ^ 2) *
E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * a) * (b ^ 2) / 0.2e1;
(t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / (a ^ 2) / (b
^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 + t
* ((1 / a / b ^ 2 * E / (1 - v ^ 2) * v) + 0.1e1 / a / (b ^ 2) * E / (1 - v
^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * a) * (b ^ 2) / 0.2e1 - (t * E / (1 -
v ^ 2) * v) / 0.2e1 t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v /
0.2e1) / 0.6e1 - (t * a / b * E / (1 - v ^ 2)) / 0.3e1 (t * ((1 / a ^ 2 / b
^ 2 * E / (1 - v ^ 2) * v) + 0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) *
(0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^ 2) / 0.2e1 - (t / b ^ 2 * E / (1 - v ^
2) * v)) * (b ^ 2) / 0.2e1 + (t * E / (1 - v ^ 2) * v) / 0.2e1 -t / a * b *
E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.6e1 - (t * a / b * E / (1
- v ^ 2)) / 0.6e1 (t * (-(1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1
/ (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * (a ^
2) / 0.2e1 + (t / b ^ 2 * E / (1 - v ^ 2) * v)) * (b ^ 2) / 0.2e1 (t * a /
b * E / (1 - v ^ 2)) / 0.6e1 - t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1
- v / 0.2e1) / 0.3e1 (t * ((1 / a ^ 2 / b ^ 2 * E / (1 - v ^ 2) * v) +
0.1e1 / (a ^ 2) / (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1))
* (a ^ 2) / 0.2e1 + t * (-(1 / a / b ^ 2 * E / (1 - v ^ 2) * v) - 0.1e1 / a
/ (b ^ 2) * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1)) * a) * (b ^ 2) /
0.2e1 t / a * b * E / (1 - v ^ 2) * (0.1e1 / 0.2e1 - v / 0.2e1) / 0.3e1 +
(t * a / b * E / (1 - v ^ 2)) / 0.3e1;];
klocal1=subs(klocal_raw,{a,b,E,t,v},{deltax,deltay,E1,t1,v1});
%--------------------------------------------------------------------------
% Assemble stifness matrix
%--------------------------------------------------------------------------
kglobal=zeros(TTDOF,TTDOF);
flocal=zeros(TTDOF,1);
for i=1:size(dofNo,1)
for j=1:8
for k=1:8
dof1=dofNo(i,j);
dof2=dofNo(i,k);
kglobal(dof1,dof2)=kglobal(dof1,dof2)+klocal1(j,k);
end
end
end
%--------------------------------------------------------------------------
% UDL
%--------------------------------------------------------------------------
eleNo=size(dofNo,1);
for i=1:dy
ele=dx*i;
dof_v2=dofNo(ele,4);
dof_v3=dofNo(ele,6);
flocal(dof_v2,1)=flocal(dof_v2,1)+qy*deltay/2;
flocal(dof_v3,1)=flocal(dof_v3,1)+qy*deltay/2;
end
%--------------------------------------------------------------------------
% Impose BC
%--------------------------------------------------------------------------
KGG=kglobal;
for i=1:size(dofe,1)
val=dofe(i,1);
kglobal(val,:)=0;
kglobal(:,val)=0;
kglobal(val,val)=1;
flocal(val,:)=0;
KGG(val,:)=[];
KGG(:,val)=[];
end
%--------------------------------------------------------------------------
% Solve d=k\f
%--------------------------------------------------------------------------
d=kglobal\flocal;
%--------------------------------------------------------------------------
% Show result for verification
%--------------------------------------------------------------------------
val=size(d,1);
u2=d(2*dx+1)
v2=d(2*dx+2)
u3=d(val-1)
v3=d(val)
%--------------------------------------------------------------------------
% plotting result (deflection)
%--------------------------------------------------------------------------
Zx=[];
Zy=[];
index=0;
for i=1:dy+1
for j=1:dx+1
index=index+1;
x_val=d(2*(index-1)+1,1);
y_val=d(2*index,1);
Zx(i,j)=x_val;
Zy(i,j)=y_val;
end
end
figure (1)
surf(X,Y,Zx)
title('x-displacement(m)')
colorbar
figure (2)
surf(X,Y,Zy)
colorbar
title('y-displacement(m)')
clc;clear all;
%--------------------------------------------------------------------------
% Input ref pg 83 schaum's
%--------------------------------------------------------------------------
E1=200e6;% Pa (N/m)
v1=0.33; % Poison ratio
t1=0.01; % Thickness of element (m)
qy=-5000; % N
val2=(i-1)*((3*dx)+2);
val3=i*((3*dx)+2);
val4=1-dx;
Nd1=1+val2;
Nd5=1+val3;
Nd4=val3+val4;
Nd8=Nd4-1;
index=index+1;
BCNode(index,1)=Nd1;
index=index+1;
BCNode(index,1)=Nd5;
index=index+1;
BCNode(index,1)=Nd8;
end
BCNode=unique(BCNode);
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
deltax=Lx/dx; % Width of single element
deltay=Ly/dy; % Height of single element
% Connectivity matrix
dofNo=[];
NodeNo=[];
index=0;
for i=1:dy
for j=1:dx
index=index+1;
val1=2*(j-1)+1;
val2=(i-1)*((3*dx)+2);
val3=i*((3*dx)+2);
val4=j-dx;
Nd1=val1+val2;
Nd4=val1+val3;
Nd6=val3+val4;
Nd5=Nd1+1;
Nd2=Nd1+2;
Nd3=Nd4+2;
Nd7=Nd4+1;
Nd8=Nd6-1;
dof1=2*(Nd1-1)+1; dof9=2*(Nd5-1)+1;
dof2=2*(Nd1-1)+2; dof10=2*(Nd5-1)+2;
dof3=2*(Nd2-1)+1; dof11=2*(Nd6-1)+1;
dof4=2*(Nd2-1)+2; dof12=2*(Nd6-1)+2;
dof5=2*(Nd3-1)+1; dof13=2*(Nd7-1)+1;
dof6=2*(Nd3-1)+2; dof14=2*(Nd7-1)+2;
dof7=2*(Nd4-1)+1; dof15=2*(Nd8-1)+1;
dof8=2*(Nd4-1)+2; dof16=2*(Nd8-1)+2;
% dof to be eliminate
dofe1=[];
index=0;
for i=1:size(BCNode,1)
NdBC=BCNode(i);
ddofeli1=2*(NdBC-1)+1;
ddofeli2=2*NdBC;
index=index+1;
dofe1(index,1)=ddofeli1;
index=index+1;
dofe1(index,1)=ddofeli2;
end
dofe=sort(dofe1,'descend');
%--------------------------------------------------------------------------
% Stiffness from Maple
%--------------------------------------------------------------------------
syms a b t E v
klocal1=subs(klocal_raw,{a,b,E,t,v},{deltax,deltay,E1,t1,v1});
%--------------------------------------------------------------------------
% Assemble stifness matrix
%--------------------------------------------------------------------------
kglobal=zeros(TTDOF,TTDOF);
flocal=zeros(TTDOF,1);
for i=1:size(dofNo,1)
for j=1:16
for k=1:16
dof1=dofNo(i,j);
dof2=dofNo(i,k);
kglobal(dof1,dof2)=kglobal(dof1,dof2)+klocal1(j,k);
end
end
end
%--------------------------------------------------------------------------
% UDL
%--------------------------------------------------------------------------
eleNo=size(dofNo,1);
for i=1:dy
ele=i*dx;
dof_v2=dofNo(ele,4);
dof_v3=dofNo(ele,6);
dof_v6=dofNo(ele,12);
flocal(dof_v2,1)=flocal(dof_v2,1)+qy*deltay/6;
flocal(dof_v6,1)=flocal(dof_v6,1)+2*qy*deltay/3;
flocal(dof_v3,1)=flocal(dof_v3,1)+qy*deltay/6;
end
%--------------------------------------------------------------------------
% Impose BC
%--------------------------------------------------------------------------
for i=1:size(dofe,1)
val=dofe(i,1);
kglobal(val,:)=[];
kglobal(:,val)=[];
flocal(val,:)=[];
end
%--------------------------------------------------------------------------
% Solve d=k\f
%--------------------------------------------------------------------------
d=kglobal\flocal;
%--------------------------------------------------------------------------
10. INTRODUCTION
This chapter describes the material nonlinearity finite element formulation of bar elements.
It begins with the discretization of the bar nonlinear ordinary differential equation (ODE) by
the Galerkin Method which is then followed by the discussion on Picard’s and Newton-
Raphson’s iterative schemes. Numerical examples are given in the forms of two assembled
bar elements for easy tracing of the procedures. Matlab source-codes are also given at the
end of the chapter.
Bar element represents one dimensional structure which deforms only in the axial direction.
A graphical description of a bar is given in Fig. 10.1 below.
Fig. 10.1 shows that, when subjected to a distributed axial load, q(u,x), the bar will deforms
axially in the forms of axial displacement, u(x). The distribution of u(x) throughout the
domain (length, L) is typically depicted by the graph u(x) versus distance, x as also shown in
the figure. Such behaviour is mathematically described by the solution of the ODE which is
given as
( ) (10.1)
( ) ( ) ( )
where ( ) and ( ) are the material property and the cross-sectional area of the bar
respectively. Both variables can vary throughout the length of the bar and can also depend
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 228
NONLINEAR FE FORMULATIONS (1-D) 2013
on the axial displacement, ( ). Such a variation can also be applied to the axial distributed
loading, ( ).
For every ODE (or PDE for that matter), the domain equation/s must be accompanied by
boundary equations and for this particular case, the equations are given as below:
( ) (10.2a)
( ) ( ) |
( )
( ) ( ) | (10.2b)
( )| (10.2c)
( )| (10.2d)
Since Eq. (10.1) is a 2nd order ODE, two boundary conditions out of the four given above
must be known in prior so as to have a well-posed problem.
Eq. (10.1) is general in the sense it contains both material and geometrical non-linearities. In
reducing the problem to material nonlinear only, the following is assumed:
i) The axial distributed load and the cross sectional area of the bar do not depend
on the axial displacement thus, q(x) and A(x), respectively
ii) The cross-sectional area of the bar does not change throughout the length thus,
A is a constant in the axial direction, x
( ) (10.3)
( ) ( )
and by omitting the writing of the independent variable, x for ease of reading gives
(10.4)
( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 229
NONLINEAR FE FORMULATIONS (1-D) 2013
The finite element formulation of the bar can be obtained through various ways i.e. Direct
Method, Weighted Residual Method, Principle of Virtual Works, Minimum Principle of Total
Potential Energy etc. Herein, however, the formulation is obtained by employing Galerkin’s
Weighted Residual Method or simply stated as Galerkin Method.
The method starts by assuming an interpolation function, u(x) in the forms of polynomial.
( ) (10.5a)
( ) (10.5b)
Despite the familiar use of polynomial functions, it is preferable however, in finite element
formulation, to deal with a special set of functions, known as shape functions, and a
special sets of coefficient, known as degree of freedoms (dof), . This means, Eqs. (10.5)
must be equivalently expressed as:
( ) (10.6a)
( ) (10.6b)
( ) for (10.7a)
( ) for ,3 (10.7b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 230
NONLINEAR FE FORMULATIONS (1-D) 2013
Being referred to as the degree of freedoms, , , and in Eqs. (10.5) (or in Eqs.
(10.6), are actually the nodal values of the axial displacement, u(x). These are graphically
described in the following figure.
The conversion from Eqs. (10.5) to Eqs. (10.6), hence the derivation of the shape functions,
can be done as follows.
i) Evaluate Eq. (10.5a) at the location of the nodes (i.e. at both ends, )
and equate them according to the dof give:
( )| ( )
(10.8a)
( )| ( )
(10.8b)
iii) Inserting Eq. (10.8b) into Eq. (10.5a) and by factorizing give:
(10.8c)
( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 231
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.8d)
Both and take the shapes as shown in Fig. 10.3. Take note of the shapes as they will
be referred later in the discussion of integration by parts and the resulting boundary terms.
i) Evaluate Eq. (10.5b) at the location of the nodes (i.e. at both ends,
) and equate them according to the dof give:
( )| ( ) ( )
( )| ( ) ( ) (10.9a)
( )| ( ) ( )
(10.9b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 232
NONLINEAR FE FORMULATIONS (1-D) 2013
iii) Inserting Eq. (10.9b) into Eq. (10.5b) and by factorizing give:
(10.9c)
( ) ( )( ) ( ) ( )
( )( )
( )
(10.9d)
( )
, and take the shapes as shown in Fig. 10.4. Take note of the shapes as they will be
referred later in the discussion of integration by parts and the resulting boundary terms.
Having established the shape functions and the degree of freedoms of the bar element, we
are all set to proceed with the discretization of the ODE.
For linear element, inserting Eq. (10.8c) into Eq. (10.4) gives:
( )
( ) (10.10a)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 233
NONLINEAR FE FORMULATIONS (1-D) 2013
whilst for quadratic element, inserting Eq. (10.9c) into Eq. (10.4) gives:
( ) (10.10b)
( )
Now, for the purpose of making easy the tracing of the procedure, let’s assume that
( ) takes the following linear constitutive relationship:
( ) (10.11)
where is taken as a constant. By inserting Eq. (10.8c) and (10.9c) subsequently, Eq. (10.11)
is then modified to become:
( ) ( ) (10.12a)
( ) ( ) (10.12b)
By inserting Eqs. (10.12) into Eqs. (10.10), the following ODEs are obtained:
( ) (10.13a)
( )
( ) (10.13b)
( )
Observing Eqs. (10.13), we can see that both can be compactly expressed in the forms of
components as:
( ) (10.14)
Take note that, from now on, we are going to deal frequently with the component forms
like Eq. (10.14), as this would eliminate the necessity to distinguish between linear and
quadratic elements. With this, it should also demonstrate the advantage of such notation
system.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 234
NONLINEAR FE FORMULATIONS (1-D) 2013
Since we have i number of unknowns (because we want to determine the values of the dof,
) we thus need i number of simultaneous equation. These required equations can be
obtained by multiplying Eq (10.14) subsequently with a set of weighting functions. For
Bubnov-Galerkin formulation, the weighting functions are also the shape functions. For
example, for a linear bar element, the two simultaneous equations can be obtained as
follows:
( )
( )
(10.15a)
( )
( )
So, in component forms, the required i simultaneous equations can be given as:
( )
( ) (10.15b)
The continuous nature of Eqs. (10.15) (since it is still in ODE forms) can be converted into
the equivalent algebraic forms by integrating over the length of the bar. This action is
referred to as ‘weighting the residual’; an action from which an approximate solution can be
obtained by forcing the residual to zero. The algebraic forms of Eq. (10.15b) are thus given
as:
( )
∫ ( ) (10.16)
It can be seen that Eq. (10.16) involves the integration over a product of functions, thus
integration by parts (IBP) can be employed. The reasons for employing the IBP are:
i) To reduce the continuity requirement since only first and lower derivatives will
be dealt with
ii) To induce (make explicit) the natural boundary conditions as boundary terms
resulting from the IBP
( )
∫ ( ) ∫ | (10.17)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 235
NONLINEAR FE FORMULATIONS (1-D) 2013
In Eq. (10.17) above, the dof, is taken out from the integral sign because it represents
constants thus does not involve in both differentiation and integration. The last terms on
the right hand side of Eq. (10.17), are called boundary terms resulting from the IBP.
By inserting Eqs. (10.7) and Eq. (10.11), the boundary terms can be given as:
( ) ( )
| | (10.18)
And further comparison with Eqs. (10.2a) and (10.2b), one can identify that Eq. (10.18) is
actually the natural boundary conditions of the bar; hence it can be given that:
( ) ( )
| | | | (10.19)
Eq. (10.19) deserves further explanation. The prevalence of the natural/force boundary
conditions, i.e. and within the equation depends on the accompanying value of the
shape functions, being evaluated at the location of the respective node i.e. | and
| . As can be seen, say from Fig. 10.3 (linear element), the value of the shape functions
at the location can be given as:
at | |
(10.20)
at | |
As a result, for linear bar element, the boundary terms of Eq. (10.19) can be specifically
given as:
| | ( ) ( )
(10.21)
| | ( ) ( )
But, for quadratic bar element, there is one particular feature worth of attention, that is, the
evaluated value of always null at the location of the edge nodes (refer Fig. 10.4). By
taking this into consideration, the boundary terms of Eq. (10.19) for a quadratic bar element
are thus given as:
| | ( ) ( )
(10.22)
| | ( ) ( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 236
NONLINEAR FE FORMULATIONS (1-D) 2013
| | ( ) ( )
Due to these various conditions and combination, it is common in the discussion of finite
element formulation to write Eq. (10.17) simply as:
∫ ( ) ∫ (10.23)
where refers to boundary terms or nodal loads. Eq. (10.23) completes the discretization
of the bar’s ODE by Galerkin Method.
Now, let’s discuss the other term on the right hand side of Eq. (10.23), that is ∫ .
Furthermore, let’s call this term as equivalent nodal loads and denote it as , thus:
∫ (10.24)
It is termed as equivalent nodal loads because these loads are the equivalent effects of a
load, q that is acting on the domain; effects as perceived at the nodes. To better describe
such equivalence, let’s refer to Fig. 10.5. As shown in the figure, the distributed loading, q(x)
which is acting on the domain of the bar would deform the bar in the same manner as if the
bar is subjected to the two nodal loads (or three for quadratic bar) which values are
calculated by Eq. (10.24).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 237
NONLINEAR FE FORMULATIONS (1-D) 2013
∫ ( ) (10.25)
Eq. (10.25) has been derived for one particular bar element, thus it is called local equilibrium
equation. For a more compact statement, Eq. (10.25) is usually written in component forms
as:
(10.26)
where is termed as the local stiffness matrix of the bar element. and , on the other
hand, are the local vector of dof and the load vector of the bar element, respectively. Thus,
the stiffness matrix and the load vector of the bar element can be given as:
∫ ( ) (10.27)
Alternatively, in matrix forms, the local equilibrium can also be represented as:
[ ]{ } { } (10.28)
In an expanded matrix forms, the stiffness matrix of linear and quadratic elements can be
respectively given as:
(10.29a)
[ ] [ ]
∫ ( )( ) ∫ ( )( )
∫ ( )( ) ∫ ( )( )
[ ]
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 238
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ] [ ]
∫ ( )( )
(10.29b)
∫ ( )( )
[ ]
(10.30a)
∫ ( )( )
∫ (( ) ( ) ) (( ) ( ))
( )
(10.30b)
∫ ( )( )
∫ (( )( ) ( )
( ) ) (( )( ))
( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 239
NONLINEAR FE FORMULATIONS (1-D) 2013
The fully (or analytically) integrated stiffness matrix for both elements can be given as:
( ) ( ) (10.31a)
[ ] [ ]
( ) ( )
[ ]
[ ]
(10.31b)
The load vectors are respectively given as:
(10.32a)
∫
{ } { }
∫
{ }
(10.32b)
∫
{ } { } { } ∫
∫
{ }
Component forms and matrix forms will be used interchangeably in our forthcoming
discussion.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 240
NONLINEAR FE FORMULATIONS (1-D) 2013
So far, the determination of the stiffness matrix terms, as have been given by Eqs. (10.31a)
and (10.31b), were carried out by analytical integration. For more general elements, such a
determination is carried out by numerical integration, for reasons as follows:
The basic concept of numerical integration is to map the actual domain (or physical domain)
which is usually irregular (but not in the present case) into a regular domain known as
natural domain. If Gauss-Legendre quadrature is employed, this natural domain usually in
the particular forms of rectangular with a side length of 2 units for two-dimensional
problem and a line of 2 units length for one-dimensional problem. This mapping is shown in
Figure 10.5a.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 241
NONLINEAR FE FORMULATIONS (1-D) 2013
As can be seen, the mapping process requires the coordinates of the physical domain to be
expressed as an interpolation functions in terms of shape functions and nodal coordinates,
which, for one-dimensional problem, can be given as:
( ) (10.33)
where, ( ) are the shape functions derived for the natural domain. The procedure to
derive these shape functions is similar to the procedure outlined previously (Eqs. (10.8) and
(10.9) except that the nodal values are evaluated at for linear bar element and
for quadratic elements. Accordingly, ( ) can be given as follows (for
quadratic element only to ease the discussion):
(10.34)
( )
(10.35)
(10.36)
( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 242
NONLINEAR FE FORMULATIONS (1-D) 2013
Now for demonstration purposes, let’s get the value of one of the stiffness matrix terms, say
(which was previously given by Eq. (10.30b)):
∫ ( )( ) (10.37)
It must be noted that in , all terms including the shape functions, are expressed in
terms of the physical coordinates, . To express everything in terms of the natural
coordinates, we must first obtain the equivalent differential. Expanding by Taylor
expansion:
(10.38)
where is the Jocabian. From Eqs. (10.33) to (10.36), the Jacobian, can be determined as
follows:
( ( ) ( ) ( ) ) (10.39)
( )
For the case where node 2 is at mid-point of the physical domain (actual element) i.e.
, the Jacobian, can be shown as simply:
(10.40)
Inserting Eq. (10.40) into Eq. (10.38), the differential can be given as:
(10.41)
Now, since we have established the differential terms, let’s determine the equivalent
derivatives terms. Based on chain-rule, the differential operator, can be expressed as:
(10.42)
Based on Eq. (10.39) and Eq. (10.40), Eq. (10.41) can be given as:
(10.43)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 243
NONLINEAR FE FORMULATIONS (1-D) 2013
Havinq established the differential and the differential operator in the natural domain, the
equivalent can be given as:
∫ ( )( )( ) (10.44)
∫ ( )( )( )
As can be seen, once converted into the natural domain, the integration limits will then
range from -1 to 1. For this limits, Gauss-Legendre quadrature provides the numerical
integration as:
∑ ( )| | |
(10.45)
where and are the number and the location of Gauss points, respectively and is the
Gauss weight. Their values are given in Table 10.1 below.
Table 10.1
Gauss Point, Location of Gauss Point, Gauss Weight,
2 ( )( ) ( )( )
3 ( )( )( ) ( )( )( )
4 ( )( ) ( )( )
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 244
NONLINEAR FE FORMULATIONS (1-D) 2013
Now, to have a better understanding towards the whole procedure, let’s demonstrate the numerical integration of for . Inserting
the shape functions of Eqs. (10.34), (10.35) and (10.36) into Eq. (10.45) yields:
( ( ))
| ( )
∑ (( ( )) ( ) ( ( )) )| | |
(10.46)
Based on the values from Table 1 for the case , Eq. (10.46) can be expanded as:
( ) (( ( )) ( ) ( ( )) )| ( )| ( )|
( ) (( ( )) ( ) ( ( )) )| ( )| ( )|
( ) (( ( )) ( ) ( ( )) )| ( )| ( )|
(10.47)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 245
NONLINEAR FE FORMULATIONS (1-D) 2013
or
( ) (( ( ( ) ( ) )) ( ( ) ) ( (( ) ( ) )) )
( ( )) ( ( ))
( ) (( ( ( ) ( ) )) ( ( ) ) ( (( ) ( ) )) )
( ( )) ( ( ))
( ) (( ( ( ) ( ) )) ( ( ) ) ( (( ) ( ) )) ) ( ( )) ( ( ))
(10.48)
thus;
( ) (10.49)
Eq. (10.49) is similar to the exact integration as given by Eq. (10.30b). This is due to the fact that was chosen as the number of
quadrature. A full integration will be obtained if the function to be integrated is of degree and the number of quadrature chosen is at
least, .
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 246
NONLINEAR FE FORMULATIONS (1-D) 2013
If quadrature higher than is chosen, it will not increase the accuracy of the integration
whilst quadrature lesser than will result in the so called reduced integration. In the
present case, due to the nonlinearity, the degree is 4 (i.e. ) thus must be at least 3 if
exact integration is to be obtained.
It must be noted however that since for this problem analytical integration is available for
the matrices, the accompanying MATLAB computer programs use these analytically
integrated values (Eqs. (10.31)) for the source coding. Numerical integration will be
employed for higher dimensions (i.e. two dimensional problems) in forthcoming chapters.
A body or a structure is meshed by many elements in a finite element analysis. The meshing
requires the assembly of local stiffness matrix, [ ] and local load vector, { } of individual
element to form the global stiffness matrix, [ ] and load vector, { }. Although in practices,
hundreds and thousands of elements might be assembled, herein, only the assembly of two
bar elements is demonstrated for easy tracing of the procedure. Fig. 10.6 shows the two
assembled bar elements together with the local and global numbering of nodes and dof.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 247
NONLINEAR FE FORMULATIONS (1-D) 2013
Based on the above, it is obvious that we need to have extra notation to distinguish
different elements. In doing this, we introduce the use of superscript as follows:
Having introduced the new superscript system, the local equilibrium for each element can
thus be given as:
[ ]{ } { } [ ]{ } { }
(10.51a)
Element 1 Element 2
b) For quadratic bar element
[ ]{ } { } [ ]{ } { } (10.51b)
Element 1 Element 2
[ ]{ } { }
[ ]{ } { }
[ ]{ } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 248
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ]{ } { }
(10.52b)
[ ]{ } { }
which can be simplified as
[ ]{ } { }
Based on Eqs. (10.52), it can be deduced that[ ], { } and { } are the global stiffness matrix,
global vector of dof and global load vector, respectively.
The assembly of local matrices into global matrix (as given by Eqs. (10.52a) and (10.52b)),
was carried out rather manually and intuitively. This approach however, would not be an
efficient way when it comes to computer programming. For a more general and systematic
approach, connectivity matrix is employed. For the assembly of two linear elements and by
referring to Figure (10.6a), the connectivity matrix can be given as:
1 2
1 2 1
(10.53a)
2 3 2
and for the assembly of two quadratic elements and by referring to Figure (10.6b), the
connectivity matrix can be given as:
1 2 3
1 2 3 1
(10.53b)
3 4 5 2
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 249
NONLINEAR FE FORMULATIONS (1-D) 2013
As can be seen from Eqs. (10.53a) and (10.53b), connectivity matrix is bracketed by a
horizontal array of dof numbering and a vertical array of element numbering. The matrix
basically maps the local dof numbering (i.e horizontal array) to the global numbering (i.e.
elements within the matrix) according to the elements (i.e. vertical array).
For example, based on the Eq. (10.53b) and for quadratic element, of element 1 would
‘overlap’ with of element 2. Also, of element 2 is mapped to globally and so on. A
careful examination would reveal that all these relationships agree with Figure (10.6b) and if
utilized, will result in an assembled global matrix similar to Eq. (10.52b).
The automatic generation of the connectivity matrix and its utilization for the assembly of
the global matrix will be demonstrated later during the discussion of the accompanying
MATLAB source codes.
The basic concept of the row-column condensation can be explained as follows. Assume
that we have a set of three simultaneous equations given as:
(10.54a)
Now, let’s assume that is known (the boundary conditions) i.e. ̅ . By inserting this
known value into Eq. (10.54a) gives:
̅ (10.54b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 250
NONLINEAR FE FORMULATIONS (1-D) 2013
Since ̅ is known, terms associated with it can be moved to the right hand side of Eq.
(10.54b), thus:
̅ (10.54c)
By examining Eq. (10.54c), one can realize that we have two unknowns with three
equations. Since we need only two equations for the solution, we can just use say, the first
and the third equations. (We can also decide to use the second equation together with
either first or third equation), thus
̅ (10.54d)
Now, the condensation can be made more obvious if we discuss the above in matrix forms.
Eq. (10.54a) can be given in matrix forms as:
[ ]{ } { } (10.54f)
If ̅ is known, Eq. (10.54f) can be condensed (thus the employment of the boundary
conditions) as follows:
̅
[ ]{ } { } (10.54g)
̅
The above explains the basic concept of row-column condensation where it can be
concluded that, an imposition of number of boundary conditions to a stiffness matrix of
size and to a load vector of , would condense the former to a size of
( ) ( ) and the latter to as size of ( ) . Once condensed, the solution
of the matrix system can proceed.
Now, let’s employ this method directly on our global equilibrium equation as given by Eqs.
(10.52). For the purpose of discussion, let’s assume that the right end of the bar is having a
specified displacement. Such a condition leads to the following essential boundary
conditions:
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 251
NONLINEAR FE FORMULATIONS (1-D) 2013
The imposition of the above boundary conditions to the global equilibrium equation can be
done as follows.
[ ]{ } { }
̅
̅
[ ]{ } { ̅}
(10.55a)
(10.55b)
[ ]{ ̅ } { }
̅
̅
̅
̅
[ ]{ } { } (10.55c)
Eqs. (10.55) are now ready to be solved. There are various ways to solve a matrix equation
such as direct inversion, Gauss Elimination, Cholesky Decomposition, etc. In the
accompanying MATLAB source codes, Gauss Elimination is adopted. Symbolically, the
solution of the matrix equation is represented as
{ } [ ] { } (10.55d)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 252
NONLINEAR FE FORMULATIONS (1-D) 2013
As mentioned, herein, we concern with the material nonlinear finite element formulation of
bar element. The source of this nonlinearity is the dependence of the value of the material
property, ( ) on the solution (or displacement), ( ) itself. Such dependency hence the
nonlinearity can be made obvious if we compare the ODEs and the equation of equilibriums
between linear and nonlinear bar problems. This is done as follows.
(10.56)
( )
whilst for nonlinear bar, the ODE is as previously given by Eq. (10.4), which is rewritten
herein as:
(10.57)
( )
As can be seen, the difference between Eq. (10.56) and Eq. (10.57) is on the constitutive
relationship of the material property, E where it is a constant in the former and a function of
( ) in the latter.
Discretizing both equations by the Galerkin method, say for linear bar element, gives:
(10.58a)
[ ]{ } { }
( ) ( )
(10.58b)
[ ]{ } { }
( ) ( )
By examining Eqs. (10.58), it can be seen that, whilst the stiffness matrix for the linear
problem consists of constant coefficients, the stiffness matrix for the nonlinear problem
contains the unknown coefficients (or the dof), i.e. , . The nonlinearity can further be
made obvious if we expand Eqs. (10.58)) as follows.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 253
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.59a)
( ) ( )
(10.59b)
( ) ( )
Simultaneous equation as given by Eq. (10.59a) is linear thus it can be solved explicitly for
and . In contrast, Eq. (10.59b) is quadratic in and thus cannot be solved directly.
Based on this, it can be said that, solving a nonlinear problem is also an act of solving for the
roots of a set of polynomial equation, thus is in need of iterative schemes.
Finally, due to the difference between linear and nonlinear problems, there is a need to
express the dependency on ( ) in the expression of the stiffness matrix of the latter, thus
the equilibrium equation of a nonlinear problem is written from now on as:
In the next discussion, we are going to consider two iterative schemes; Piccard’s and
Newton-Raphson’s.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 254
NONLINEAR FE FORMULATIONS (1-D) 2013
Consider the nonlinear equilibrium equation as given in Eq. (10.60b); rewritten herein as:
[ ( )]{ } { } (10.61)
Basically, we are in a dilemma as the vector { }that we want to determine (i.e. by inversing
the stiffness matrix, [ ( )]) in turn, is what is needed for the determination of the matrix in
the first place. So, the best option for us to proceed, (in fact the only option that we have),
is to use a known (or assumed) set of { } in calculating [ ( )] and once calculated, the
latter is inversed to solve for{ }. One can expect that this is going to be a sequential
process; a process which sequence can be mathematically expressed with the assistance of
a new superscript system, detailed as:
[ ( ) ]{ } { } (10.62)
where refers to the present stage or present iteration. This then makes ( ) to
represent the immediate previous stage or iteration. Since this is a material nonlinear
formulation, no superscript needs to be associated with the load vector as the forces acting
on the system is independent of { } hence the iteration. And, since in general { } and
{ } are not similar (except when the solution has converged), the left hand side terms of
Eq. (10.62) cannot be equalled to the load vector, { } hence the inequality sign. In fact,
the difference between these terms would yield a residual, thus:
{ } [ ( ) ]{ } { } (10.63)
The aim of the iteration process is to reduce the residual, { } to a point of convergence,
that is { } is small enough for us to accept that { } and { } can be considered as
‘equal’ thus { } can be considered as the solution of the equation of equilibrium. The
measure of the residual can be given in two types of norm, firstly by:
(10.64)
√∑
∑ | |
√ (10.65)
∑ | |
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 255
NONLINEAR FE FORMULATIONS (1-D) 2013
i) Whilst boundary conditions are known and applied throughout the process, the
known set { } is only employed once at the beginning so as to kick start the
iteration
ii) Whilst boundary conditions is the known conditions at the boundary nodes, the
known set { } is the value at all nodes; both in the domain and at the
boundaries
Despite some of the variations, all iterative schemes basically share the same basic concept
as detailed above. To be specific, most of the available schemes would have the following
features:
Picard scheme is also known as the direct iteration method. It is called direct because the
scheme is not far from the basic concept as previously outlined. But, its simplicity is not
without a price. Piccard scheme usually works for mild nonlinear problems but diverges for
severe nonlinearity.
STEP 3: solve { }
STEP 4: calculate the residual, { } using Eq. (10.63) and check for convergence using
either Eq. (10.64) or Eq. (10.65).
STEP 5: if converge, stop iteration else solve { } using Eq. (10.62), else
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 256
NONLINEAR FE FORMULATIONS (1-D) 2013
INPUT
For
r=1:m
YES
r=1 {𝑈}𝑖𝑛𝑖𝑡𝑖𝑎𝑙
NO
{𝑈}𝑟
[𝐾]𝑟
Impose essential
boundary conditions
{𝑅}𝑟
YES
𝑒𝑟𝑟𝑜𝑟 < PRINT STOP
NO
YES NO WRITE A
r<1 STOP
MESSAGE
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 257
NONLINEAR FE FORMULATIONS (1-D) 2013
An alternative iterative scheme which performs better when the nonlinearity is more severe
is the Newton-Raphson scheme. The basic concept of the scheme is based on the Taylor’s
series expansion of the equilibrium equation. The residual of the equilibrium equation can
be given as:
{ ( )} [ ( )]{ } { } (10.66)
Expanding Eq. (10.66) by Taylor’s series about the known ( ) solution gives:
{ ( ) } (10.67)
{ ( )} { ( ) } { }
{ }
where the series has been truncated up to linear terms only. Rearranging gives:
{ ( ) } (10.68)
{ } { ( ) }
{ }
Let’s define a new matrix and call it as tangent stiffness matrix, [ ( ) ], thus;
{ ( ) } (10.69)
[ ( ) ]
{ }
[ ( ) ]{ } { ( ) } (10.70)
Examining Eq. (10.70), one can observed that { } is now solvable since the other terms i.e.
[ ( ) ] and { ( ) } are known because these terms use the results from the previous
iteration i.e. ( ) solution. By inversing [ ( ) ], { } is thus can be obtained as:
{ } [ ( ) ] ( { ( ) }) (10.71)
{ } { } { } (10.72)
In the next iteration, { } of Eq. (10.72) will be inserted back into Eq. (10.70) and take the
role as { } in the determination of [ ( ) ] and { ( ) }. This process is repeated
until the solution converges.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 258
NONLINEAR FE FORMULATIONS (1-D) 2013
In the previous discussion, definition of tangent stiffness has been given. Herein, the
detailed formulation of the matrix is detailed out. For this purpose, Eq (10.69) is rewritten as
below.
{ ( ) } (10.73)
[ ( ) ]
{ }
The nominator on the right hand side terms of Eq. (10.73) is actually the residual of the
equilibrium equation at the ( ) iteration which can be given as:
{ ( ) } [ ( ) ]{ } { } (10.74)
{[ ( ) ]{ } { }} (10.75)
[ ( ) ]
{ }
By employing chain-rule and since { } does not depend on { } (we are not considering
geometric nonlinearity), Eq. (10.75) can be expanded to:
[ ( ) ] { }
[ ( ) ] { } [ ( ) ]
{ } { }
[ ( ) ]
{ } [ ( ) ] (10.76)
{ }
[ ̂( ) ] [ ( ) ]
Eq. (10.76) is derived at global level. It is more convenient to derive the tangent stiffness
matrix at local. Therefore, for local and in terms of components, the tangent stiffness matrix
of an element can be given as:
[ ( ) ]
[ ( ) ] { } [ ( ) ]
{ }
(10.77)
[̂ ( ) ] [ ( ) ]
whilst ( ) has been derived as the stiffness matrix of the element as given by Eqs.
(10.31), ̂ ( ) deserves further and more detailed formulation. This is given next.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 259
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ( ) ]
̂ ( ) { } (10.78)
{ }
[∫ ( ) ]
̂ ( ) { } (10.79)
{ }
( )
(10.80)
{ }
( )
(10.81)
{ }
A more mathematically elegant way is by the use of Kronecker delta, . It can be shown
that
{ }
{ (10.82)
{ }
By inserting Eq. (10.82) into Eq, (10.80) and since Kronecker delta, acts as substitution
operator, it can thus be obtained that:
( )
(10.83)
{ }
By inserting either Eq. (10.80) or Eq. (10.83) into Eq. (10.79), the following is obtained:
̂ ( ) ∫ ( ) { } (10.84)
Since we are freely can place { } either inside or the outside of the integral (since it is a
vector of constant), it is preferable to place it inside the integral; a preference which is to be
obvious later. Thus;
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 260
NONLINEAR FE FORMULATIONS (1-D) 2013
( )
̂ ( ) ∫ ( ) (10.85)
The association of with in the Eq. (10.85) above is appropriate because together,
they would represent the interpolation function, ( ) . Having established all
these, we are now in the position to formulate the fully integrated tangent stiffness matrix,
( ) for both linear and quadratic bar element. Using Eq. (10.85) and the appropriate
shape functions as given by Eq. (10.8d) and Eq. (10.9d), it can be obtained that:
̂ ̂
[ ] [ ] [ ]
̂ ̂
( ) ( )
∫ ( ) ∫ ( )
( ) ( )
∫ ( ) ∫ ( )
[ ]
[ ]
(10.86a)
̂ ̂ ̂
[ ] [̂ ̂ ̂ ] [ ]
̂ ̂ ̂
( )
∫ ( ) ̂ ̂
̂ ̂ ̂
( )
∫ ( ) ̂ ̂
[ ]
[ ]
(10.86b)
Stiffness matrices which are given in Eqs. (10.86) are still in integral forms. For
demonstration purposes, the integration of ̂ are shown below for both linear and
quadratic elements. The fully integrated stiffness matrix of both elements is then given.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 261
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) (10.87a)
̂ ∫ ( )
∫ ( ( )( ) (( ) ( ) ))
( )
( ) (10.87b)
̂ ∫ ( )
∫ ( ( )( ) (( ) ( )
( ) ))
( )
By repeating the process for other elements of the matrix, the fully integrated stiffness
matrix for both elements can be given as:
( ) ( )
( ) ( )
[ ]
( ) ( )
( ) ( )
[ ]
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 262
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ]
(10.88a)
̂ ̂ ̂
[ ] [̂ ̂ ̂ ] [ ]
̂ ̂ ̂
[ ]
[ ]
[ ]
[ ]
(10.88b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 263
NONLINEAR FE FORMULATIONS (1-D) 2013
STEP 2: use the known { } to calculate the global tangent stiffness matrix,
[ ] using Eqs. (10.88)
STEP 6: check for convergence using either Eq. (10.64) or Eq. (10.65).
STEP 7: if converge, stop iteration else repeat STEP 2 by using the just solved { } as
{ }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 264
NONLINEAR FE FORMULATIONS (1-D) 2013
INPUT
For r=1:m
YES
r=1 {𝑈}𝑖𝑛𝑖𝑡𝑖𝑎𝑙
NO
{𝑈}𝑟
[𝐾]𝑟
[𝑇]𝑟
{𝑅}𝑟
{ 𝑈} [𝑇]𝑟 \ {𝑅}𝑟
{𝑈}𝑟 {𝑈}𝑟 { 𝑈}
YES PRINT
𝑒𝑟𝑟𝑜𝑟 < STOP
NO
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 265
NONLINEAR FE FORMULATIONS (1-D) 2013
Herein, we are going to provide the numerical examples to demonstrate the use of the
procedures which we have discussed previously. Three examples will be given as follows:
The examples solve the problem of a bar structure as shown in Fig. 10.9 by discretizing it (or
meshing) it with two assembled bar elements.
The material and the geometrical data for the analysis are given as follows:
Material coefficient, =1
Boundary conditions:
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 266
NONLINEAR FE FORMULATIONS (1-D) 2013
‘Initial’ conditions:
Convergence criterion:
Exact solutions (or closed –form solution) of the ODE (for comparison purpose):
at
at
a) First iteration, ( )
By using previously given data and Eq (88a) the tangent stiffness matrices at the first
iteration (i.e ( )), [ ] and [ ] for element 1 and 2, respectively are thus given
as:
̂ ̂
[ ] [ ] [ ]
̂ ̂
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ( ) ( ) ] [ ( ) ( ) ]
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 267
NONLINEAR FE FORMULATIONS (1-D) 2013
) ( ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ( ) ( ) ] [ ( ) ( ) ]
[ ]
(10.89a)
̂ ̂
[ ] [ ] [ ]
̂ ̂
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ( ) ( ) ] [ ( ) ( ) ]
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ( ) ( ) ] [ ( ) ( ) ]
[ ] [ ]
[ ]
(10.89b)
And the load vector as well as the vector of dof can be given as:
Element 1
∫
{ } { } { } { } { } { } { }
∫
{ } (10.90a)
{ }
{ } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 268
NONLINEAR FE FORMULATIONS (1-D) 2013
Element 2
∫
{ } { } { } { } { } { } { }
∫
{ }
{ }
{ } { } { }
(10.90b)
By assembling the two elements, we thus obtain the following. This is done by inserting the
values derived in Eqs. (10.89) and (10.90) into Eq. (10.70).
(10.91)
[ ] { }
[[ ] { }
{ } ]
(10.92)
[ ] { } { }
Take note that is a specified boundary condition thus does not change. This unchanged
value means there is no variation in thus is zero throughout the analysis, as shown
in Eqs. (10.91) and (10.92) above. A condensed system will then give us:
(10.93)
[ ] { } { }
(10.94)
{ } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 269
NONLINEAR FE FORMULATIONS (1-D) 2013
And the complete solution as given by Eq. (10.72) can be obtained as:
(10.95)
{ } { } { } { } { } { }
b) Second iteration, ( )
In this second iteration, values solved in the first iteration (10.95) are used for the
determination of the relevant matrices thus the tangent stiffness matrices for element 1
and element 2 are given as follows.
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
[ ]
( ) ( ) ( ) ( )
[ ( ) ( ) ] [ ( ) ( ) ]
[ ]
(10.96a)
( ) ( )
( ) ( )
[ ]
( ) ( )
[ ( ) ( ) ]
( ) ( )
( ) ( )
( ) ( )
[ ( ) ( ) ]
[ ]
(10.96b)
By inserting the values derived in Eqs. (10.90) and (10.95) into Eq. (10.70).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 270
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.97)
[ ] { }
[[ ] { } { } ]
{ }
(10.98)
[ ] { } { }
(10.99)
{ } { }
And the complete solution as given by Eq. (10.72) can be obtained as:
(10.100)
{ } { } { } { }
Next, we checked for convergence and this is done by calculating the root-mean square
error taken about the solution obtained from the previous iteration (1 st iteration) using Eq.
(10.64), thus:
(10.101)
√∑
Based on the above, it can be seen that the solutions still have not converged so the
iteration must be continued. Solution as given in Eq. (10.100) is then used in the next
iteration( ). If we repeat the whole procedure hence proceed with the iteration, the
following results can be obtained:
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 271
NONLINEAR FE FORMULATIONS (1-D) 2013
The iteration process is stopped at the 3rd iteration because it can be shown that the
convergence criterion has been met. In fact, these values coincide perfectly with the exact
solutions (i.e. those obtained from the closed-form solution of the ODE).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 272
NONLINEAR FE FORMULATIONS (1-D) 2013
a) First iteration, ( )
By using previously given data and Eq (10.31b) the local stiffness matrices at the first iteration (i.e ( )), [ ] for element 1 and 2,
respectively are thus given as:
[ ] [ ]
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ] (10.103a)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 273
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ] [ ]
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ]
(10.103b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 274
NONLINEAR FE FORMULATIONS (1-D) 2013
The load vector and the vector of degree of freedoms can be given as:
Element 1
{ } { } { } { } { } ∫ { } { }
∫ { }
{ }
{ } { } (10.104a)
Element 2
{ } { } { } { } { } ∫ { } { }
∫ { }
{ }
{ } { } { } (10.104b)
By assembling the two elements, we thus obtain the following. This is done by inserting the
values derived in Eqs. (10.103) and (10.104) into Eq. (10.52b).
[ ] { } { }
(10.105)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 275
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) (10.106)
( )
[ ] { } { } { } { }
(10.107)
{ } { }
b) Second iteration, ( )
In this second iteration, values solved in the first iteration (10.107) are used for the determination of the relevant matrices thus the local
stiffness matrices for element 1 and element 2 are given as follows.
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 276
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ] (10.108a)
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ] (10.108b)
By inserting the values derived in Eqs. (10.108) into Eq. (10.52b) gives:
(10.109)
[ ] { } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 277
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) (10.110a)
( )
[ ] { } { } { } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 278
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.110b)
{ } { }
Next, we checked for convergence and this is done by calculating the root-mean square
error taken about the solution obtained from the previous iteration (1 st iteration) using Eq.
(10.64), thus:
√∑
Based on the above, it can be seen that the solutions still have not converged so the
iteration must be continued. Solution as given in Eq. (10.110b) is then used in the next
iteration( ). If we repeat the whole procedure hence proceed with the iteration, the
following results can be obtained:
{ } { }
{ } { }
The iteration process is stopped at the 4th iteration because it can be shown that the
convergence criterion has been met. In fact, these values coincide perfectly with the exact
solutions (i.e. those obtained from the closed-form solution of the ODE).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 279
NONLINEAR FE FORMULATIONS (1-D) 2013
a) First iteration, ( )
By using previously given data and Eq. (10.88b) the tangent stiffness matrices at the first iteration (i.e ( )), [ ] and [ ] for element
1 and 2, respectively are thus given as:
̂ ̂ ̂
[ ] [̂ ̂ ̂ ] [ ]
̂ ̂ ̂
[ ]
[ ]
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 280
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ]
[
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ] [ ] [ ]
(10.111a)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 281
NONLINEAR FE FORMULATIONS (1-D) 2013
̂ ̂ ̂
[ ] [̂ ̂ ̂ ] [ ]
̂ ̂ ̂
[ ]
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ]
[
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 282
NONLINEAR FE FORMULATIONS (1-D) 2013
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ] [ ]
[ ]
(10.111b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 283
NONLINEAR FE FORMULATIONS (1-D) 2013
And the load vector as well as the vector of degree of freedoms can be given as:
Element 1
{ } { } { } { } { } ∫ { }
(10.122a)
∫ { }
{ }
{ }
{ } { }
Element 2
{ } { } { } { } { } ∫ { } (10.122b)
∫ { }
{ }
{ }
{ } { } { }
By assembling the two elements, we thus obtain the following. This is done by inserting the
values derived in Eqs. (10.111) and (10.112) into Eq. (10.70).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 284
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ] { }
(10.113)
[[ ] { } { } ]
(10.114)
[ ] { } { }
Take note that is a specified boundary condition thus does not change. This unchanged value means there is no variation in thus is
zero throughout the analysis, as shown in Eqs. (10.113) and (10.114) above. A condensed system will then give us:
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 285
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.115)
[ ] { } { }
(10.116)
{ } { }
And the complete solution as given by Eq. (10.72) can be obtained as:
(10.117)
{ } { } { } { } { } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 286
NONLINEAR FE FORMULATIONS (1-D) 2013
b) Second iteration, ( )
In this second iteration, values solved in the first iteration (10.117) are used for the determination of the relevant matrices thus the tangent
stiffness matrices for element 1 and element 2 are given as follows.
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ]
(10.118a)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 287
NONLINEAR FE FORMULATIONS (1-D) 2013
[ ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ]
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )]
[ ]
(10.118b)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 288
NONLINEAR FE FORMULATIONS (1-D) 2013
By inserting the values derived in Eqs. (10.112) and (10.117) into Eq. (10.70).
[ ] { }
(10.119)
[ ] { }
{ } { }
[ ]
(10.120)
[ ] { } { }
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 289
NONLINEAR FE FORMULATIONS (1-D) 2013
(10.121)
{ } { }
And the complete solution as given by Eq. (10.72) can be obtained as:
(10.122)
{ } { } { } { }
Next, we check for convergence and this is done by calculating the root-mean square error
taken about the solution obtained from the previous iteration (1st iteration) using Eq.
(10.64), thus:
(10.123)
√∑
Based on the above, it can be seen that the solutions still have not converged so the
iteration must be continued. Solution as given in Eq. (10.122) is then used in the next
iteration( ). If we repeat the whole procedure hence proceed with the iteration, the
following results can be obtained:
{ } { }
The iteration process is stopped at the 3rd iteration because it can be shown that the
convergence criterion has been met. In fact, these values coincide perfectly with the exact
solutions (i.e. those obtained from the closed-form solution of the ODE).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 290
NONLINEAR FE FORMULATIONS (1-D) 2013
10.12 THINGS TO KNOW ABOUT MATLAB AND THE ASSEMBLY OF TWO ELEMENTS
Herein, features of MATLAB employed in the accompanying source codes are briefly
reviewed.
i) The statement for a row vector, v is "v=[a,b,c]" or "v=[a b c]" whilst the
statement of for a column vector is "v=[a;b;c]". Take note of the use of comma (and
spacing) in the specification of the row vector and the use of semi colon for the column
vector. The above statements would return, respectively
v =
a b c
v =
ii) If a vector, say "v=[a,b,c]" has been specified, the statement, "v(2)" would return
ans =
iii) Usually a zero vector with a size of (1xn) is generated in prior to the future operation
on the vector. This is done by the statement, "v=zeros(1,n)". For example, statement
"v=zeros(1,3)" would return
v =
0 0 0
4 7 3
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 291
NONLINEAR FE FORMULATIONS (1-D) 2013
m =
[ a, b, c]
[ d, e, f]
ii) If a matrix, say "m=[a,b,c;d,e,f]" has been specified, the statement, "m(2,3)"
would return
ans =
ans =
[ d, e, f]
iii). If a matrix, say "m=[a,b,c;d,e,f]" has been specified, the statement, "m(2,:)=[]"
would return
ans =
[ a, b, c]
As can be seen, the above argument eliminates row 2 from the matrix. This argument
will be used in the imposition of essential boundary conditions.
m =
3 6 3
7 7 8
The command "subs ()" will be used in the computer programming to replace the
symbolic degree of freedom (i.e. , and ) in the stiffness matrices with its
corresponding numerical values.
v) Usually a zero matrix with a size of (nxp) is generated in prior to the future operation
on the matrix. This is done by the statement, "m=zeros(n,p)". For example, statement
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 292
NONLINEAR FE FORMULATIONS (1-D) 2013
m =
0 0 0
0 0 0
To create a square zeros matrix of (nxn), only a single argument is needed i.e.
"m=zeros(n)".
vi) Say two vectors have been specified; "v1=[2,3]" and "v2=[1,4]" and a matrix has
also been specified, say
m =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
The statement "m(v1,v2)" and "m([2,3],[1,4])", both would return the same
answer, that is
ans =
23 14
4 20
Based on the above, it can be observed that, such arguments refer to the components
of matrix which are , , and , hence the answer. Observe this
relationship carefully because this important feature of MATLAB is frequently employed
during the assembly of the global matrices when utilizing connectivity matrix. In this
context, say there is another matrix been defined, "p=zeros(5)" which would return
p =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
Note that, "p" is defined so as to have the same size as matrix "m". A statement
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 293
NONLINEAR FE FORMULATIONS (1-D) 2013
p =
0 0 0 0 0
23 0 0 14 0
4 0 0 20 0
0 0 0 0 0
0 0 0 0 0
The above operation must be discussed in detailed. What happen is, the statement
actually maps each components of "m(v1,v2)" which has been shown as having the
values of
23 14
4 20
p(v1,v2)=m(v1,v2)
p(v1,v2)=m(v1,v2)+ p(v1,v2)
0 0 0 0 0
46 0 0 28 0
8 0 0 40 0
0 0 0 0 0
0 0 0 0 0
This recursion and the resulting overlapping process will be the basic methodology for
the assembly of the global matrices. However, whilst herein the recursion has been
implemented manually, in the actual source coding this is done by using the loop "for-
end". This is discussed next.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 294
NONLINEAR FE FORMULATIONS (1-D) 2013
In this nonlinear programming of steady bar problem, there are two loops involved;
loop for the assembly of the global matrices and iteration for the convergence of the
solution of the equilibrium equation. The former is referred as the internal loop whilst
the latter is referred as the external loop. We will encounter these loops in the
accompanying source codes thus discuss about it later. Herein, an introductory example
of a looping process is shown.
p(v1,v2)=m(v1,v2)
p(v1,v2)=m(v1,v2)+ p(v1,v2)
for i=1:2
p(v1,v2)=m(v1,v2)+ p(v1,v2)
end
p(v1,v2)=m(v1,v2)
p(v1,v2)=m(v1,v2)+ p(v1,v2)
p(v1,v2)=m(v1,v2)+ p(v1,v2)
p =
0 0 0 0 0
69 0 0 42 0
12 0 0 60 0
0 0 0 0 0
0 0 0 0 0
for i=1:3
p(v1,v2)=m(v1,v2)+ p(v1,v2)
end
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 295
NONLINEAR FE FORMULATIONS (1-D) 2013
i) Having established the knowledge on MATLAB vector's and matrix's commands as well
as the looping "for-end", we are ready to put them into practice in the assembly of two
quadratic bar elements. The local stiffness matrix is as shown in Eq. (103a) and Eq.
(103b) for Element 1 and Element 2, respectively. Herein, we are going to assemble the
global stiffness matrix of Eq. (105) alternatively using the connectivity matrix as
previously given by Eq. (53b) given again herein as
1 2 3
1 2 3 1
3 4 5 2
LocalDOFNumbering =
1 2 3
ElementNumbering =
1
2
Now, we are in the position to define the connectivity matrix. First we specify a zero
connectivity matrix as "ConnectivityMatrix
=zeros(length(ElementNumbering),length(LocalDOFNumbering))" which returns
ConnectivityMatrix =
0 0 0
0 0 0
To note, in the statement above the command "length()" would produce the total
number of components that exists in a vector thus statement
"length(LocalDOFNumbering)" for example, would return the value of 3.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 296
NONLINEAR FE FORMULATIONS (1-D) 2013
Employing the loop "for-end", the connectivity matrix can now be generated by the
following loop
for i=1:length(ElementNumbering)
ConnectivityMatrix(i,1:length(LocalDOFNumbering)) = ...
2*(i-1)+LocalDOFNumbering;
end
ConnectivityMatrix =
1 2 3
0 0 0
ConnectivityMatrix =
1 2 3
3 4 5
With this, we have successfully generated automatically the connectivity matrix. Now
we can proceed with the assembly of the global stiffness matrix which previously given
by Eq. (105). To do this, we must define first, the local stiffness matrix of Element 1 and
Element 2.
The local stiffness matrix for Element 1 and Element 2 (with initial condition been
imposed) as given by Eq. (103a) and Eq. (103b) is defined herein as "k1=[4.6667,-
5.3333,0.6667;-5.3333,10.6667,-5.3333;0.6667,-5.3333,4.6667]" and
"k2=[4.5838,-5.4438,0.8600;-5.4438,11.9921,-6.5483;0.8600,-
6.5483,5.6884]" which both would return
k1 =
k2 =
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 297
NONLINEAR FE FORMULATIONS (1-D) 2013
Before we proceed with the automated assembly of the global stiffness matrix with the
use of loop "for-end", let's do it manually. A statement
K1Global =zeros(DofNumber)
K1Global(ConnectivityMatrix (1,:), ConnectivityMatrix (1,:))=k1
would return
K1Global =
and a statement
K2Global =zeros(DofNumber)
K2Global(ConnectivityMatrix (2,:), ConnectivityMatrix (2,:))=k2
would return
K2Global =
0 0 0 0 0
0 0 0 0 0
0 0 4.5838 -5.4438 0.8600
0 0 -5.4438 11.9921 -6.5483
0 0 0.8600 -6.5483 5.6884
Finally, the global stiffness matrix can be obtained through summation as follows
KGlobal=K1Global+K2Global
KGlobal =
Thus the attainment of the global stiffness matrix at the left-hand side of Eq. (105).
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 298
NONLINEAR FE FORMULATIONS (1-D) 2013
Now, let's construct the global stiffness matrix automatically by employing the loop
"for-end". What basically we want to do is to make automatic recursion of the previous
statement, given again herein as
KGlobal =zeros(DofNumber)
K1Global =zeros(DofNumber)
K2Global =zeros(DofNumber)
K1Global(ConnectivityMatrix (1,:), ConnectivityMatrix (1,:))=k1
K2Global(ConnectivityMatrix (2,:), ConnectivityMatrix (2,:))=k2
KGlobal=K1Global+K2Global
Tracing the running of the arguments (i.e. (1,:), (2,:)) and the notation (i.e.
K1Global, K1Global ), the recursion of the above statement is obviously feasible.
However, to make everything automatic, this also means that generation of the local
stiffness matrix must be automatic as well. As given by Eq (31b), the general equation
for the local stiffness matrix can be given as
k =
As can be seen, the general statement of the local stiffness matrix, “ k” is expressed
symbolically in terms of the degree of freedoms. The insertion of the appropriate values
of the degree of freedoms is what differentiates between elements hence the
materialization of k1 and k2, for instance. To insert these value, the aforementioned
command "subs ()" is used and a vector which contains known degree of freedom
must be created. Also, the length of the element, “L” must also be specified.
For the first iteration, this vector contains the initial conditions. Since herein we are
going to demonstrate the automatic generation of the previously given global stiffness
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 299
NONLINEAR FE FORMULATIONS (1-D) 2013
matrix in Eq. (105); the ones obtained with the initial condition being imposed, what we
are going to do first is to create an initial condition vector and equate this to the vector
of global degree of freedom. The initial conditions vector is created by the following
statement
Uinitial = zeros(1,ElementNumber*2+1);
Uinitial(1:end-1) = 1;
Uinitial(end) = sqrt(2)
Argument “(end)” yields the last element in a vector and since the essential boundary
condition in the Example is specified at the far-right end of the bar with a value of √ ,
statement “Uinitial(end)= sqrt(2)” would prescribe such a boundary conditions.
The above statement would return the following
Uinitial =
UGlobal = Uinitial
UGlobal =
Before we proceed, length of the element, “L” must also be assigned and this can be
done by stating that
TotalLength = 1;
ElementNumber = 2;
ElementLength = TotalLength/ElementNumber;
TotalLength =
ElementNumber =
ElementLength =
0.5000
Having established “UGlobal” and “ElementLength”, the next step is to loop the
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 300
NONLINEAR FE FORMULATIONS (1-D) 2013
assembly of the global stiffness matrix. This can be done by the following loop
DofNumber = length(ElementNumbering)*2 + 1;
KGlobal =zeros(DofNumber);
for e = 1:length(ElementNumbering)
Klocal_Global = zeros(DofNumber);
uLocal = UGlobal(ConnectivityMatrix(e,:));
kLocal = subs(k,{u1,u2},{uLocal(1:2)});
kLocal = subs(kLocal,{u3,L},{uLocal(end), ElementLength});
Klocal_Global(ConnectivityMatrix(e,:),ConnectivityMatrix(e,:)) ...
= kLocal;
KGlobal= Klocal_Global + KGlobal
end
kLocal =
Klocal_Global =
KGlobal =
uLocal =
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 301
NONLINEAR FE FORMULATIONS (1-D) 2013
kLocal =
Klocal_Global =
0 0 0 0 0
0 0 0 0 0
0 0 4.5838 -5.4438 0.8600
0 0 -5.4438 11.9922 -6.5484
0 0 0.8600 -6.5484 5.6884
KGlobal =
Again, the attainment of the stiffness matrix in Eq (105) but this time rather
automatically. To put everything into perspective, below is the source code of what
have been discussed above; provided in such a way that a user can simply cut and paste
them onto MATLAB and run the program straight away to obtain the final global
stiffness matrix above. Try them, just cut and paste.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 302
NONLINEAR FE FORMULATIONS (1-D) 2013
syms u1 u2 u3 L
A=1
E=1
TotalLength = 1
ElementNumber = 2
ElementLength = TotalLength/ElementNumber
Uinitial = zeros(1,ElementNumber*2+1);
Uinitial(1:end-1) = 1;
Uinitial(end) = sqrt(2)
ElementNumbering = zeros(ElementNumber,1);
for i=1:ElementNumber
ElementNumbering(i,1) = i;
end
for i=1:3
LocalDOFNumbering(1,i) = i;
end
ConnectivityMatrix = ...
zeros(length(ElementNumbering),length(LocalDOFNumbering));
for i=1:length(ElementNumbering)
ConnectivityMatrix(i,1:length(LocalDOFNumbering)) = ...
2*(i-1)+LocalDOFNumbering
end
DofNumber = 2*length(ElementNumbering)+1;
KGlobal =zeros(DofNumber);
UGlobal = Uinitial;
for e = 1:length(ElementNumbering)
Klocal_Global = zeros(DofNumber);
uLocal = UGlobal(ConnectivityMatrix(e,:))
kLocal = subs(k,{u1,u2},{uLocal(1:2)});
kLocal = subs(kLocal,{u3,L},{uLocal(end), ElementLength})
Klocal_Global(ConnectivityMatrix(e,:),ConnectivityMatrix(e,:))...
= kLocal;
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 303
NONLINEAR FE FORMULATIONS (1-D) 2013
It must be noted that the above given source code is general enough in terms of the
number of element. We can create the assembly of this initial stiffness matrix (initial
since the matrix has been generated by initial conditions only) for any desired number
of element just by setting the statement “ElementNumber = ()” to the desired
number.
Play with this as this can stress out the advantage of automated algorithm as compared
to manual process. For example, by setting “ElementNumber = 3” which means the
assembly of three elements, the following global stiffness matrix is obtained
KGlobal =
KGlobal =
Can you see the advantage now? It is just cool, isn’t? Imagine to assemble four elements
manually, it is definitely going to be a heck of a job.
So far, what we have discussed in this section is the algorithm to make automatic the
assembly of the stiffness matrix but we still have not discussed the full solution of the
nonlinear discretized equilibrium equation. We will do this in the next sections where
we will discuss the full source codes for the problem, involving the discussion on the
iterative schemes, imposition of essential boundary conditions, solution of the
equilibrium equation by Gauss Elimination through the use of command “\”,
convergence check and many more. But having this section as a ‘soft-landing’ would
definitely be of great help.
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 304
NONLINEAR FE FORMULATIONS (1-D) 2013
% -------------------------------------------------------------------------
% CLEAR DATA
% -------------------------------------------------------------------------
clc; clear all;
syms u1 u2 u3 L
% -------------------------------------------------------------------------
% 1. INPUT
% -------------------------------------------------------------------------
% 1.1 Physical Input
q = -1;
E = 1;
A = 1;
TotalLength = 1;
Uinitial(1:end-1) = 1;
Uinitial(end) = sqrt(2);
% -------------------------------------------------------------------------
% 2.LOCAL STIFFNESS AND TANGENT STIFFNESS MATRICES (Quadratic Element)
% AND LOCAL LOAD VECTORS
% -------------------------------------------------------------------------
% 2.1 Local Stiffness Matrix
k = E*A*[((37*u1)/30 +(6*u2)/5 - u3/10)/L, ...
-((22*u1)/15 +(16*u2)/15 + (2*u3)/15)/L,...
((7*u1)/30 -(2*u2)/15 + (7*u3)/30)/L;
-((22*u1)/15 +(16*u2)/15 + (2*u3)/15)/L,...
((8*u1)/5 +(32*u2)/15 + (8*u3)/5)/L, ...
-((2*u1)/15 +(16*u2)/15 + (22*u3)/15)/L;
((7*u1)/30 -(2*u2)/15 + (7*u3)/30)/L,...
-((2*u1)/15 +(16*u2)/15 + (22*u3)/15)/L,...
(-u1/10 +(6*u2)/5 + (37*u3)/30)/L];
% -------------------------------------------------------------------------
% 3. CONNECTIVITY MATRIX
% -------------------------------------------------------------------------
% 3.1 Element Numbering
ElementNumbering = zeros(ElementNumber,1);
for i=1:ElementNumber
ElementNumbering(i,1) = i;
end
end
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 305
NONLINEAR FE FORMULATIONS (1-D) 2013
% -------------------------------------------------------------------------
% 4. ASSEMBLY OF STIFFNESS MATRIX, IMPOSITION OF
% BOUNDARY CONDITION AND PICCARD SOLUTION
% -------------------------------------------------------------------------
UGlobal = Uinitial';
DofNumber = length(ElementNumbering)*2 + 1;
for r = 1:4
KGlobal =zeros(DofNumber);
RGlobal =zeros(DofNumber,1);
FGlobal =zeros(DofNumber,1);
for e = 1:length(ElementNumbering);
Klocal_Global = zeros(DofNumber);
Flocal_Global =zeros(DofNumber,1);
uLocal = UGlobal(ConnectivityMatrix(e,:));
kLocal = subs(k,{u1,u2},{uLocal(1:2)});
kLocal = subs(kLocal,{u3,L},{uLocal(end), ElementLength});
Klocal_Global(ConnectivityMatrix(e,:),ConnectivityMatrix(e,:)) ...
= kLocal;
KGlobal= Klocal_Global + KGlobal;
fLocal = subs(f,{L},{ElementLength});
Flocal_Global(ConnectivityMatrix(e,:),1) = fLocal;
FGlobal= Flocal_Global + FGlobal;
end
% 4.1 Imposition of Boundary Condition
BoundaryCondition = Uinitial(end);
RGlobal = FGlobal-KGlobal(:,end)*BoundaryCondition;
RGlobal(end) = [];
KGlobal(end,:) = [];
KGlobal(:,end) = [];
UGlobalPrevious = UGlobal;
% 4.2 Solution of Equilibrium Equation
UGlobal = KGlobal\RGlobal;
% 4.3 Returning KGlobal, FGlobal and UGlobal into its Original Size
KGlobal(:,end+1)=0;
KGlobal(end+1,:)=0;
FGlobal(end+1,1) = 0;
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 306
NONLINEAR FE FORMULATIONS (1-D) 2013
UGlobal(end+1,1) = Uinitial(end);
if residual <1e-3
break
end
end
line(xInterval,U,'linestyle','-.','color','r','marker','*')
% 6.2 Finite Element Results
for i=1:size(UGlobalAll,1)
if i==1
marker = 's';
elseif i==2
marker = 'o';
elseif i==3
marker = '+';
elseif i==4
marker = '^';
end
line(xInterval,UGlobalAll(i,:),'color','k','marker',marker)
hold on
end
legend('Analytical','r = 1','r = 2','r = 3','r = 4')
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 307
NONLINEAR FE FORMULATIONS (1-D) 2013
1.5
Analytical
r=1
1.4 r=2
r=3
r=4
1.3
1.2
1.1
0.9
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 308
NONLINEAR FE FORMULATIONS (1-D) 2013
% -------------------------------------------------------------------------
% CLEAR DATA
% -------------------------------------------------------------------------
clc; clear all;
syms u1 u2 u3 L
% -------------------------------------------------------------------------
% 1. INPUT
% -------------------------------------------------------------------------
% 1.1 Physical Input
q = -1;
E = 1;
A = 1;
TotalLength = 1;
Uinitial(1:end-1) = 1;
Uinitial(end) = sqrt(2);
% -------------------------------------------------------------------------
% 2.LOCAL STIFFNESS AND TANGENT STIFFNESS MATRICES (Quadratic Element)
% AND LOCAL LOAD VECTORS
% -------------------------------------------------------------------------
% 2.1 Local Stiffness Matrix
k = E*A*[((37*u1)/30 +(6*u2)/5 - u3/10)/L, ...
-((22*u1)/15 +(16*u2)/15 + (2*u3)/15)/L,...
((7*u1)/30 -(2*u2)/15 + (7*u3)/30)/L;
-((22*u1)/15 +(16*u2)/15 + (2*u3)/15)/L,...
((8*u1)/5 +(32*u2)/15 + (8*u3)/5)/L, ...
-((2*u1)/15 +(16*u2)/15 + (22*u3)/15)/L;
((7*u1)/30 -(2*u2)/15 + (7*u3)/30)/L,...
-((2*u1)/15 +(16*u2)/15 + (22*u3)/15)/L,...
(-u1/10 +(6*u2)/5 + (37*u3)/30)/L];
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 309
NONLINEAR FE FORMULATIONS (1-D) 2013
ElementNumbering = zeros(ElementNumber,1);
for i=1:ElementNumber
ElementNumbering(i,1) = i;
end
end
% -------------------------------------------------------------------------
% 4. ASSEMBLY OF STIFFNESS MATRIX, TANGENT STIFFNESS MATRIX, IMPOSITION OF
% BOUNDARY CONDITION AND NEWTON-RAPHSON SOLUTION
% -------------------------------------------------------------------------
UGlobal = Uinitial';
DofNumber = length(ElementNumbering)*2 + 1;
for r = 1:4
KGlobal =zeros(DofNumber);
TGlobal =zeros(DofNumber);
FGlobal =zeros(DofNumber,1);
for e = 1:length(ElementNumbering);
Klocal_Global = zeros(DofNumber);
Tlocal_Global = zeros(DofNumber);
Flocal_Global =zeros(DofNumber,1);
uLocal = UGlobal(ConnectivityMatrix(e,:));
kLocal = subs(k,{u1,u2},{uLocal(1:2)});
kLocal = subs(kLocal,{u3,L},{uLocal(end), ElementLength});
Klocal_Global(ConnectivityMatrix(e,:),ConnectivityMatrix(e,:)) ...
= kLocal;
KGlobal= Klocal_Global + KGlobal;
tLocal = subs(t,{u1,u2},{uLocal(1:2)});
tLocal = subs(tLocal,{u3,L},{uLocal(end), ElementLength});
Tlocal_Global(ConnectivityMatrix(e,:),ConnectivityMatrix(e,:)) ...
= tLocal;
TGlobal= Tlocal_Global + TGlobal;
fLocal = subs(f,{L},{ElementLength});
Flocal_Global(ConnectivityMatrix(e,:),1) = fLocal;
FGlobal= Flocal_Global + FGlobal;
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 310
NONLINEAR FE FORMULATIONS (1-D) 2013
end
% 4.1 Imposition of Boundary Condition (direct elimination can be
% implemented because Delta_U always zero
R = (KGlobal)*UGlobal - FGlobal;
R(end) = [];
TGlobal(end,:) = [];
TGlobal(:,end) = [];
% 4.3 Returning KGlobal, TGlobal and Delta_U into its Original Size
TGlobal(:,end+1)=0;
TGlobal(end+1,:)=0;
Delta_U(end+1,1)= 0;
if residual <1e-3
break
end
end
line(xInterval,U,'linestyle','-.','color','r','marker','*')
% 6.2 Finite Element Results
for i=1:size(UGlobalAll,1)
if i==1
marker = 's';
elseif i==2
marker = 'o';
elseif i==3
marker = '+';
elseif i==4
marker = '^';
end
line(xInterval,UGlobalAll(i,:),'color','k','marker',marker)
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 311
NONLINEAR FE FORMULATIONS (1-D) 2013
hold on
end
legend('Analytical','r = 1','r = 2','r = 3','r = 4')
1.5
Analytical
r=1
1.4 r=2
1.3
1.2
1.1
0.9
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
© AIRIL YASREEN MOHD YASSIN, PhD & ERWAN HAFIZI KASIMAN, MEng Page 312
LINEAR AND NONLINEAR FINITE ELEMENT FOR 2013
SOLIDS AND FLUIDS
FLUID DYNAMICS
NAVIER-STOKES EQUATION
12. INTRODUCTION
The behaviour of flow of fluids and gases obey the three conservation laws; mass,
momentum and energy. The complete modelling of these laws hence the actual flow
behaviour is extremely difficult. It is a practice, therefore, to reduce the complexity of the
problem by introducing appropriate assumptions. Herein, it is assumed that;
i. flow is incompressible
These assumptions allow us to deal with a simpler set of equations but sufficient enough for
its expansion to more general cases becomes obvious.
NOTE: Section 12.1 is provided for completeness. Readers which main interest is on the FEM
formulation for the problem can skip these subchapters and go straight to Section 12.2.
By employing assumption ii) which means that there is no variation in temperature in the
flow, a flow problem can be completely described by the mass (continuity) and momentum
equations alone as the energy equation is now uncoupled from the latter. The derivation of
mass (continuity) equation is given next, followed by the derivation of the momentum
equation. To note, from now on, mass equation will be referred to continuity equation.
The continuity equation can be derived by considering a differential element of the flow as
shown in Figure 12.1. As shown in the figure, the variables to be considered are the density,
, velocities in x-direction, and y-direction, as well in z-direction, Similar to previous
chapters, the variables are expand by Taylor series at all sides (surfaces).
The conservation of mass principle requires that the time rate of decrease of mass inside
the differential element must be equalled to the net mass flow out of the differential
element through its surface. The former can be given as;
The determination of the net mass flow can be done by considering first the net outflow of
the flow in each direction.
In x-direction, by balancing terms on the right and left sides of the differential element, we
obtain;
( ) ( ) (12.2)
( ) ( )
( ) ( ) (12.3)
( ) ( )
( ) ( ) (12.4)
( ) ( )
Having established the new flow in all direction, the net mass flow of the fluid out of the
differential element through its surface can thus be given as
( ) ( ) ( ) (12.5)
Net mass flow= ( )
The principle of mass conservation requires Eqn. (12.5) to be equalled to (12.1) thus;
( ) ( ) ( ) (12.6)
=( )
or
( ) ( ) ( ) (12.7)
(12.8)
{ }{ }
where
(12.9)
{ } { }
{ } { } (12.10)
Eqns. (12.7) and (12.8) are the continuity equation for the flow given in the form termed as
conservation forms. In this form, the product of , and are themselves treated as
the dependent variables.
However, sometime, it would be more convenient to deal directly with the velocities
components, , and w, termed as primitive variables as this would be more familiar from
FEM point of view, at least from what we have encountered so far.
(12.11)
{ }{ }
Now, since Eqn. (12.7) or involve the derivation of the product of two functions (more
obvious by looking as Eqn. (12.8), we can expand this derivative by chain-rule as;
(12.12)
{ }{ } { }{ }
If we observe carefully Eqn. (12.12), we will notice that the differential operators which
operate on the density, , can be replaced by the material derivative. By inserting Eqn.
(12.11) into (Eqn. (12.12) we obtain;
(12.13)
{ }{ }
Having established Eqn. (12.13), we thus obtained the continuity equation of the flow in
terms of the primitive variables. In its expanded form, the equation can be given as;
(12.14)
( )
Now, we employ assumption i) that is, the flow is incompressible. Incompressible fluid is a
fluid having constant density. Accordingly, incompressible flow refers to the state where the
rate of change of density is assumed zero. It is worth to note that, while incompressible flow
does not really refer to incompressible fluid as the latter is an ideal state of fluid, the terms
are usually interchangeable. Due to assumption i), Eqn. (12.14) is reduced to;
(12.15)
The momentum equation is the principle based on Newton’s 2 nd Law which basic
form is
(12.16)
where is the force acting on a particle whilst and are the mass and the acceleration of
the particle, respectively. For a continuum of higher dimension, Eqn. (12.16) is expanded
into
∑ (12.17a)
∑ (12.17b)
∑ (12.17c)
Eqns. (12.17) represent the equilibrium of forces in all direction. Since we base our
discussion on Eulerian formulation, the accelerative terms on the right and side of the
equations should be expressed in terms of the material derivatives, thus;
(12.18a)
∑
(12.18b)
∑
(12.18c)
∑
since . Terms on the left hand side of Eqns. (2.18) can be determined by
considering the differential element of the flow as shown in Figure 12.2.
As shown in the figure, the variables to be considered are pressure, and viscous stress;
normal and shear stresses in x-direction, y-direction and in z-direction Similar to previous
chapters, the variables are expand by Taylor series at all sides (surfaces).
(12.19)
∑ ( ( )) (( ) )
(( ) )
(( ) )
where is the body force in the x-direction. By inserting Eqn. (12.19) into Eqn.
(12.18a), expanding and cancelling, the following is obtained;
(12.20)
Eqn. (12.20) is the momentum equation for the flow in the x-direction. Applying the same
procedure to the other directions, momentum equations in y-direction and z-direction can
be given, respectively as
(12.21)
Eqns. (12.20) to (12.22) are the complete momentum equations for 3 dimensional flow. By
inserting the material derivative as given by Eqn. (12.11) into the equations, we can
expressed the equations in terms of the primitive variables as
(12.23)
( )
(12.24)
( )
(12.25)
( )
Eqns. (12.15) and (12.23) to (12.25) are the 3 dimensional continuity and the momentum
equations of the flow which are famously known as Navier-Stokes equations. These
equations are supplemented by boundary condition equations which discussion is going to
be given next. Also, since the equations can be time-dependent or unsteady (if time
derivative terms are not omitted), the solution of the PDE would require initial conditions to
be prescribed.
Like other PDEs, the continuity and the momentum equations must be supplemented by
boundary condition equations so as to have a well-posed problem. There are two types of
boundary conditions; Newmann (natural) and Dirichlet (essential) boundary conditions.
i. in x-direction
(12.26)
ii. in y-direction
(12.27)
iii. in z-direction
(12.28)
where, , and are the components of the unit normal vector of the surface under
consideration. It worth to note that, for rectangular domain hence rectangular elements
(12.29)
(12.30)
(12.31)
It can be seen later that the secondary terms produced by the integration by parts
conducted on the viscous and the pressure terms of the momentum equations will be in
similar forms as in Eqns. (12.26) to (12.28) and (12.29) to (12.31); the latter are for
rectangular domain. Due to this, equations above are also known as natural boundary
conditions.
Dirichlet boundary condition requires that the velocity components at the boundary where
natural conditions are unknown (to be solved) must be known thus specified.
̅( ) (12.32)
̅( ) (12.33)
̅( ) (12.34)
For no slip condition, normally the specified value of the velocities can either be zero or
equalled to the velocity of the boundary.
There are other possible boundary conditions for a flow such as slip condition and free
surface condition. However, these are not covered herein.
Eqns. (12.15), (12.23) to (12.25) are the three-dimensional Navier-Stokes equations together
with their boundary conditions equations given by Eqns. (12.26) to (12.28) and (12.32) to
(12.34). If we employ assumption iii) that the flow behaviour is assumed constant in the
width direction, the equations can be reduced to two-dimensional which can be given as
follows.
Continuity equation
(12.35)
(12.36)
( )
(12.37)
( )
(12.38)
(12.39)
̅( ) (12.40)
̅( ) (12.41)
It is convenient to express the continuity equation (Eqn. (12.35) and the momentum
equations (Eqns. (12.36) and (12.37)) in vector and matrix forms, as we did for heat and
plane stress elements so as to allow for easy tracing of the extension of the procedure. This
away, the evolution of the procedure can easier be followed.
In matrix and vector forms, the continuity equation (Eqn. (12.35) can be given as;
(12.42)
{ }{ }
or
{ }{ } (12.43)
To express the momentum equations in matrix and vector forms, it would be an advantage
if we highlight the similarity of the viscous terms to previously discussed plane stress
formulation as this, not only allow for easy tracing of the evolution of the procedure,
emphasizes the applicability of the algorithm developed for the former to be directly used in
the latter, maybe with some slight modification.
(12.44)
( )
(12.45)
( )
BOX A
By observing BOX A, we can notice how similar the terms inside the box to the ones we
encountered in the plane stress problem. Due to this, similar matrix and vector forms can
be employed, thus;
(12.46)
{ }
{ } [ ]
or
(12.47)
[ ]{ }
{ }
Now, by employing assumption iv) that is, the fluid is assumed as materially linear
(Newtonian) and isotropic, as well as assumption i) that is, the flow is incompressible, the
terms ( ), which initially exists in the normal stress relationship where is the
second viscosity coefficient, is excluded.
(12.48)
( )
(12.49)
{ } [ ]
{ }
or
{ } [ ] { } (12.50)
[ ]
Observe that the second matrix on the right hand side of the equation above is also the
transpose of the differential operator matrix, [ ] previously defined in Eqns. (12.46) and
(12.47). Based on this and by introducing the constitutive matrix, [ ], Eqn. (12.50) can be
given as;
{ } [ ][ ] { } (12.51)
By inserting Eqn. (12.51) into Eqn. (12.47), the viscous terms can be completely expressed in
terms of the primitive variables, and as
[ ][ ][ ] { } (12.52)
{ }
Observing Eqn. (12.52), we can notice that the equation is exactly similar to the ones
derived for the plane stress problem.
(12.53)
( )
(12.54)
( )
B C D E
(12.55)
{ } { }
{ }
Terms in BOX C can be given in vector forms as
(12.56)
{ } { } { }
(12.57)
̇
{ } { } { } { ̇}
̇
( )
{ }
( )
{ } [ ]
(12.58)
{ }{ }{ }
{ } { }{ }
{ } [ ][ ][ ] { } { } { ̇} { } { }{ } (12.59)
Eqns. (12.43) and (12.59) are the continuity and momentum equation for 2 dimensional
viscous incompressible fluid problems.
Having established the PDE of the problem, we are all set to descritize the equations so as to
obtain the FEM algebraic formulation. There are various ways to this; two famous
formulations are mixed and penalty formulations. However, herein we will concern only
with mixed formulation.
The term ‘mixed’ refers to the fact that we have variables from different families; velocities
and pressure. Whilst the former is displacement related quantities, the latter is force-
related quantity. Previous studies have shown that, for the formulation to work well, the
order of interpolation of velocities must be higher than the pressure. Due to this, to
interpolate the velocities, quadratic shape functions are employed while for pressure,
bilinear shape functions are used. For rectangular elements these mean
(12.60)
{ } { } [ ]{ ̂}
{ }
{ }{ } { }{ ̂ }
(12.61)
[ ] and { } are similar to those previous derived for scalar (heat transfer) and plane stress
elements. Due to this the arrangement of nodes for a rectangular element is shown in
Figure 12.3.
For a rectangular element, it is still convenient to provide the shape functions in the physical
coordinates ( ) and conduct analytical integration. For demonstration purposes and to
ease the tracing of the formulation, herein these are pursued. But it must be noted that, in
practical, the shape function functions are expressed in natural coordinates, ( ) and
numerical integration is employed as these would allow for easier treatment of elements
with irregular shape. Discussion on these will be given later.
(A12.61a)
( ) ( )
(A12.61b)
( ) ( )
(A12.61c)
( )
(A12.61d)
( )
(A12.61e)
( ) ( )
(A12.61f)
( )
(A12.61g)
(B12.61a)
(B12.61b)
(B12.61c)
(B12.61d)
Inserting Eqns. (12.60) and (12.61) into (12.59) and (12.43),we obtain
Continuity
{ }[ ]{ ̂} (12.62)
Momentum
{ }{ }{ ̂ } [ ][ ][ ] [ ]{ ̂} { } ̇
[ ]{ ̂} [ ]{ ̂} { }[ ]{ ̂} (12.63)
Note that, in the time derivative terms, since the shape function [ ] are not functions of
̇ .
time, the dofs are thus differentiated by time, i.e { ̂}
By observing Figure 12.3 and Eqn. (12.60) as well as Eqn. (12.61), we can identify that, for an
element, we have 20 unknown dofs, i.e. { } with
only 3 equations. To obtain sufficient number of equations, we will multiply then integrate
mass equation (Eqn. (12.62)) with pressure shape function { } to produce 4 independent
equations and the momentum equations (Eqn. (12.63)) to produce 16 independent
equations. Together, they will make up 20 simultaneous algebraic equations as required.
Multiplying Eqn. (12.62) with pressure shape functions { } and integrating give
∫ ∫ { } { }[ ]{ ̂} (12.64)
By multiplying the velocity shape functions [ ] to the momentum equations (Eqn. (12.63))
and integrating give
∫ ∫ [ ] { }{ }{ ̂ } ∫ ∫ [ ] [ ][ ][ ] [ ]{ ̂}
∫ ∫[ ] { } (12.65)
̇
∫ ∫ [ ] [ ]{ ̂}
∫ ∫ [ ] [ ]{ } { }[ ]{ ̂}
Such intentions will not be fulfilled if IBP is conducted to the continuity equation. In the
context of point ii) even if we conduct IBP to the continuity equation, the resulting boundary
terms, would not have physical meaning.
Also, based on point i) and ii), IBP should be conducted onto pressure and viscous terms
only as these will induce the natural boundary conditions as previously given by Eqns.
(12.38) and (12.39). Therefore, by conducting IBP to Eq (12.65) but to the pressure and
viscous terms only, results in
∫ ∫ [ ] { }{ }{ ̂ } ∫ ∫ [ ] [ ][ ][ ] [ ]{ ̂}
∫ ∫[ ] { }
(12.66)
̇
∫ ∫ [ ] [ ]{ ̂}
∫ ∫ [ ] [ ]{ ̂} { }[ ]{ ̂} ∫[ ] { }
Since the viscous terms are similar in forms to those derived for plane stress problem; let’s
call the corresponding matrix as stiffness matrix [ ] where
[ ] ∫ ∫ [ ] [ ]{ }[ ] [ ] (12.67)
Due to the similarity, stiffness matrix algorithms previously established for plane stress
problem can thus be applied. Next, by observing terms associated with time derivative of
dofs, one can notice that they are in similar forms to the mass matrix discussed in Chapter 6.
So let’s call the corresponding matrix as mass matrix [ ] where
(12.68)
[ ] ∫ ∫[ ] [ ]
Next, by considering the pressure terms, let’s introduce a coefficient matrix, [ ] where
(12.69)
[ ] ∫ ∫ [ ] { }{ }
The second last terms on the right hand side of Eqn. (12.66) exhibits nonlinearity.
Accordingly, we introduce a matrix termed as nonlinear matrix [ ] where
(12.70)
[ ] ∫ ∫ [ ] [ ]{ } { }[ ]
(12.71)
{ } ∫ ∫[ ] { }
(12.72)
{ } ∫[ ] { }
Having established these corresponding matrices and vectors, the continuity and the
momentum equations can be compactly expressed. For the continuity equation, it can be
shown that;
By inserting Eqns. (12.67) to (12.73) into Eqns. (12.64) and (12.66) and by extracting the dofs
from the integral sign, we obtain the following
Continuity
[ ] { ̂} (12.74)
Momentum
[ ]{ } [ ]{ ̂} { } ̇
[ ]{ ̂} [ ]{ ̂} { } (12.75)
Since IBP is conducted only on some terms whilst there are others which are not, it is
important to note that, those terms which are subjected to IBP, the multiplication between
terms inside the integral must be carried out from left to right while for those which are not,
the multiplication must be carried out from right to left. To demonstrate this and to provide
example on how to build the above matrices, the determination of element (3,4) for each
matrix and element (3,1) for each vector above are shown below. Complete formula for
every element in every matrix and vector are given in the Appendix. Although in practice,
numerical integration is employed which detailed procedure is given in later chapter, herein
analytical integration is employed so as to allow for easy tracing of the procedure and to
allow for its immediate application. Such analytical integrations are possible herein because
we limit our discussion to rectangular domain thus rectangular elements only.
i.
We begin our demonstration by showing the derivation for element of the mass matrix,
[ ]. Since this term has no derivative, no dilemma on whether to conduct IBP or not. Thus,
∫∫[ ][ ] ∫∫ ( ) ( )( ) (12.76)
Stiffness matrix, [ ] involves IBP thus the matrix multiplication must be carried out from left
to right. We will do this in step-by-step manner.
Step 1
(12.77)
[ ] [ ]
[ ]
Step 2
[ ][ ] [ ] (12.78)
Step 3
(12.79)
[ ] [ ( ) ( ) ]
[ ]
Step 4
[ ( ) ( ) ][ ]
(12.80)
( ) ( ) ( ) ( )
∫∫ ( ) (12.81)
For a rectangular element with a width of and a height of , as shown in Figure 12.3,
can be re-given as
∫ ∫ (( )( ( ) )) (12.82)
iii.
Coefficient matrix, [ ] involves IBP thus the matrix multiplication must be carried out from
left to right.
Step 1
(12.83)
[ ][ ] [ ]
Step 2
[ ][ ] [ ] (12.84)
∫∫( )
∫∫( ) (12.85)
iv.
Nonlinear matrix, [ ] does not involves IBP thus the matrix multiplication must be carried
out from right to left.
Step 1
[ ][ ] [ ]
(12.86)
Step 2
(12.87)
[ ]
{ } [ { } ]
Step 3
[ ]
[ { } ]
{ } { } { } { } { } { } { } { }
{ } { } { } { } { } { } { } { }
[ ]
(12.88)
Step 4
{ } { } { } { } { } { } { } { }
[ ]
{ } { } { } { } { } { } { } { }
[ ]
[ { } { } { } { } { } { }
{ } { }]
(12.89)
Step 5(analytical integration)
∫∫ { } { } { } { }
{ } { } { } { }
{ } { } { } { } { } { }
(12.90)
{ } { }
The continuity equation and the momentum equations, as given by Eqns. (12.74) and
(12.75), respectively can be combined together in the following way. If the dof are grouped
together in such way that
{ ̂} (12.91)
{ } { }
{ ̂}
[ ] ̇
{ ̂} [ ] [ ] [ ] { ̂} { } { } (12.92)
[ ]{ } [ ]{ } { } { }
{ ̇̂} [ ] { ̂}
[ ]{ ̇ } [ ( )]{ } { } (12.93)
where the use of capital letters are not only to highlight the representation of the various
sub-matrices by a combined matrix where
but also to highlight that, our discussion from hereafter assumes that the elements have
been assembled.
To note, [ ( )] is expressed in such way so as to remind that the matrix contains nonlinear
matrix [ ] which in turn contains the dofs, { } hence the nonlinear nature.
Next, we are going to discuss about time integration and nonlinear scheme required in the
solution of Eqn. (12.93).
Eqn. (12.93) involves the first order derivative of the dof’s in time, expressed by { ̇ }. As a
derivative, it can be discretized, which the common practice would be, by finite difference
method. Basically there are two ways to do this;
Despite the two available techniques, herein, we will concern only with Backward Euler
scheme. Readers who are interested to know about the other technique can refer to books
on finite difference method and finite element method.
(12.96)
[ [ ] [ ( )]] { } [ ]{ } { }
Eqn. (12.96) is the discretized equation of Navier-Stokes in time by Backward Euler (finite
difference). However, the equation is yet to be solved as it is nonlinear. We must resort to a
nonlinear solution scheme which is to be discussed next.
[ ̅( )]{ } {̅ ( )} (12.97)
where
(12.98)
[ ̅( )] [ [ ] [ ( )]]
(12.99)
{̅ ( )} [ ]{ } { }
There are many nonlinear schemes which are available; the most basic ones are Piccard and
Newton-Raphson schemes. Herein, we will only discuss Piccard scheme. It is the most
straightforward scheme and also known as direct substitution method. To solve Eqn. (12.97)
by Piccard scheme, we use previous iteration values of i.e. { } where represent
last iteration, in the construction of the matrix, [ ̅ ( )]. With this, Eqn. (12.97) can be
modified as
[ ̅( )]{ } {̅ } (12.100)
where represent current stage of iteration. Having established Eqn. (12.85), we are
now all set to solve the problem. We need to iterate until the solution { } is converged.
Once converged, we then go to the next time step. A step-by-step procedure is given as
follows.
STEP 3: solve { }
STEP 5: if converged, stop iteration and go the next time step, else repeat STEP 1 by
using the just solved { } as { }
Density,
Viscosity,
Lid velocity,
Time step,
Due to the symmetrically, each element would have similar local stiffness matrix [ ], mass matrix [ ], coefficient matrix, [ ], and nonlinear
matrix [ ]. Based on Eqn. 12.67, local stiffness matrix [ ] is given as
[ ]
[ ]
(E12.1)
[ ]
[ ]
(E12.2)
Based on Eqn. 12.69, coefficient matrix [ ] is given as
[ ] [ ]
(E12.3)
[ ] { }
{ }
(E12.4)
(E.12.5)
{ }
{ }
{ }
The maximum residual between current and previous result are 2.5431.
Using the result from previous iteration, the nonlinear matrix [ ] is given as
[ ]
[ ]
(E12.6)
[ ] { }
{ }
(E12.7)
(E.12.8)
{ }
{ }
{ }
The maximum residual between current and previous result are 0.0034. For the purpose of
demonstration, let assume that the result is convergence. We can now break the nonlinear
iteration loop and calculate the value at the second time step using the current result as
initial value.
Using the result from previous iteration, the nonlinear matrix [ ] is given as
[ ]
[ ]
(E12.9)
[ ] { }
{ }
(E12.10)
(E.12.11)
{ }
{ }
{ }
The maximum residual between current and previous result are 0.1938.
Using the result from previous iteration, the nonlinear matrix [ ] is given as
[ ]
[ ]
(E12.12)
[ ] { }
{ }
(E12.13)
(E.12.14)
{ }
{ }
{ }
The maximum residual between current and previous result are 0.0012. The obtained
results after total time are validated herein for various mesh number against those
obtained from commercial software.
Mesh (4x4)
Mesh (20x20)
Mesh (40x40)
Software
Figure E12.4 Velocity contour of 40 x 40 elements (a) and commercial software (b).
Figure E12.5 Pressure contour of 40 x 40 elements (a) and commercial software (b).
clc;clear all;
%--------------------------------------------------------------------------
% Input
%--------------------------------------------------------------------------
re = 1;
rho = 1; % Fluid density [kg / m^3]
miu = 1.1; % Fluid viscosity [kg / (m.s)]
T = 10; % Total time [s]
dt = 0.1; % Time increment [s]
maxIter = 100; % Maximum nonlinear iteration
maxTol = 1e-4; % Maximum nonlinear error tolerance
Vel = 2; % velocity [m/s]
%--------------------------------------------------------------------------
% Preparing data
%--------------------------------------------------------------------------
[deltax,deltay,NodeNo,dofNo_UV,dofNo_P,numVariables,nodeXY,...
numNode,numElement,nodeXY_U,nodeXY_V,nodeXY_P]=PrepareData...
(Lx,Ly,Nx,Ny);
Data_uvp=[];
index_save=0;
%-------------------------------------------------------------------------
% Euler Backward Scheme
%-------------------------------------------------------------------------
for iTime = 1:round(T/dt)
% Time increment
t = t + dt;
%---------------------------------------------------------------------
% Picard Scheme
%---------------------------------------------------------------------
for iter = 1:2%maxIter
% Preallocate
K = zeros(numVariables);
M = zeros(numVariables);
R = zeros(numVariables,1);
%-----------------------------------------------------------------
% Loop for every element
%-----------------------------------------------------------------
NonLinear_paper =NonLinearMatrix(rho,deltax,deltay,uvp);
Mass_paper =MassMatrix(rho,deltax,deltay);
Stiffness_paper =StiffnessMatrix(miu,deltax,deltay);
Coefficient_paper =CoefficientMatrix(deltax,deltay);
%-------------------------------------------------------------
% Assemble Matrix
%-------------------------------------------------------------
for assem_i=1:16
dofNo_UV_i=dofNo_UV(iele,assem_i);
for assem_j=1:16
dofNo_UV_j=dofNo_UV(iele,assem_j);
K(dofNo_UV_i,dofNo_UV_j)=K(dofNo_UV_i,dofNo_UV_j)+...
Stiffness_paper(assem_i,assem_j)+...
NonLinear_paper(assem_i,assem_j);
M(dofNo_UV_i,dofNo_UV_j)=M(dofNo_UV_i,dofNo_UV_j)+...
Mass_paper(assem_i,assem_j);
end
end
Coeff1=-Coefficient_paper;
Coeff2=Coeff1';
for assem_i=1:16
dofNo_UV_i=dofNo_UV(iele,assem_i);
for assem_j=1:4
dofNo_P_j=dofNo_P(iele,assem_j);
K(dofNo_UV_i,dofNo_P_j)=K(dofNo_UV_i,dofNo_P_j)+...
Coeff1(assem_i,assem_j);
K(dofNo_P_j,dofNo_UV_i)=K(dofNo_P_j,dofNo_UV_i)+...
Coeff2(assem_j,assem_i);
end
end
%-------------------------------------------------------------
end
%-----------------------------------------------------------------
Keffeli=Keff;
Reffeli=Reff;
%-----------------------------------------------------------------
% Impose BC
%-----------------------------------------------------------------
dofloc_eliuv=[];
dofloc_Velo=[];
% Node coordinate
x = nodeXY(i, 1);
y = nodeXY(i, 2);
% Top lid
if y == 1
indx_velo=indx_velo+1;
dofloc_Velo(indx_velo,1)=iu;
% Vertical velocity bc
Keff(iv, :) = 0;
Keff(iv, iv) = 1;
Reff(iv, :) = 0;
end
% Horizontal velocity bc
Keff(iu, :) = 0;
Keff(iu, iu) = 1;
Reff(iu, :) = 0;
indx_e=indx_e+1;
dofloc_eliuv(indx_e,1)=iu;
% Vertical velocity bc
Keff(iv, :) = 0;
Keff(iv, iv) = 1;
Reff(iv, :) = 0;
indx_e=indx_e+1;
dofloc_eliuv(indx_e,1)=iv;
indx_e=indx_e+1;
dofloc_eliuv(indx_e,1)=ip;
end
end
end
%-----------------------------------------------------------------
for ivel=1:size(dofloc_Velo,1)
Velloc=dofloc_Velo(ivel,1);
Reffeli(Velloc,1)=Vel;
end
dofloc_eliuv=sort(dofloc_eliuv,'descend');
for ieli=1:size(dofloc_eliuv,1)
elival=dofloc_eliuv(ieli,1);
if elival >0
Keffeli(elival,:)=[];
Keffeli(:,elival)=[];
Reffeli(elival,:)=[];
end
end
unote=Keffeli\Reffeli;
unoteR=RepairAns(unote,dofloc_eliuv,numVariables);
end
%---------------------------------------------------------------------
% Assign variables for next time iteration
uvp0 = uvp;
%---------------------------------------------------------------------
% Save result
%---------------------------------------------------------------------
index_save=index_save+1;
Data_uvp(:,index_save)=uvp;
end
%-------------------------------------------------------------------------
% Meshgrid
[X, Y] = meshgrid(0:deltax:Lx, 0:deltay:Ly);
function [deltax,deltay,NodeNo,dofNo_UV,dofNo_P,TDOF,nodeXY,numNode,...
numElement,nodeXY_U,nodeXY_V,nodeXY_P]=...
PrepareData(Lx,Ly,Nx,Ny)
% Connectivity matrix
dofNo_UV=[];
dofNo_P=[];
NodeNo=[];
index=0;
for i=1:Ny
for j=1:Nx
index=index+1;
val1=2*(j-1)+1;
val2=(i-1)*((3*Nx)+2);
val3=i*((3*Nx)+2);
val4=j-Nx;
Nd1=val1+val2;
Nd7=val1+val3;
Nd4=val3+val4;
Nd2=Nd1+1;
Nd3=Nd1+2;
Nd5=Nd7+2;
Nd6=Nd7+1;
Nd8=Nd4-1;
dof1=2*(Nd1-1)+1; dof9=2*(Nd2-1)+1;
dof2=2*(Nd1-1)+2; dof10=2*(Nd2-1)+2;
dof3=2*(Nd3-1)+1; dof11=2*(Nd4-1)+1;
dof4=2*(Nd3-1)+2; dof12=2*(Nd4-1)+2;
dof5=2*(Nd5-1)+1; dof13=2*(Nd6-1)+1;
dof6=2*(Nd5-1)+2; dof14=2*(Nd6-1)+2;
dof7=2*(Nd7-1)+1; dof15=2*(Nd8-1)+1;
dof8=2*(Nd7-1)+2; dof16=2*(Nd8-1)+2;
TTDOF_UV=max(max(dofNo_UV));
% Correction on dofNo_P
index=0;
for i=1:Ny
for j=1:Nx
index=index+1;
val1=(Nx+1)*(i-1)+j;
val2=(Nx+1)*(i)+j;
Nd1=val1+TTDOF_UV;
Nd2=val1+1+TTDOF_UV;
Nd3=val2+1+TTDOF_UV;
Nd4=val2+TTDOF_UV;
dofNo_P(index,:)=[Nd1 Nd2 Nd3 Nd4];
end
end
else
n = n+1;
nodes(i,j) = n;
end
end
end
% Elements number
% Connectivity matrix
n = 0;
elementNode = zeros(numElement, 8);
elementCenter = zeros(numElement, 2);
for j = 2:2:length(y)
for i = 2:2:length(x)
n = n+1;
elementNode(n,:) = [ nodes(i-1, j-1), ...
nodes(i+1, j-1), ...
nodes(i+1, j+1), ...
nodes(i-1, j+1), ...
nodes(i, j-1), ...
nodes(i+1, j), ...
nodes(i, j+1), ...
nodes(i-1, j), ...
];
% Element center coordinate
elementCenter(n,:) = [X(i,j), Y(i,j)];
end
end
% Nodes coordinate
nodeXY = [ X(:) Y(:) ];
nodeXY( isnan( nodes(:) ), : ) = [];
% Node number
numNode = length(nodeXY);
nodeXY_U=zeros(numNode,3);
nodeXY_V=zeros(numNode,3);
nodeXY_P=zeros(numNode,3);
nodeXY_U(1:numNode,1:2)=nodeXY;
nodeXY_V(1:numNode,1:2)=nodeXY;
nodeXY_P(1:numNode,1:2)=nodeXY;
% Connectivity
for i=1:numElement
Nd1=NodeNo(i,1);
Nd2=NodeNo(i,2);
Nd3=NodeNo(i,3);
Nd4=NodeNo(i,4);
Nd5=NodeNo(i,5);
Nd6=NodeNo(i,6);
Nd7=NodeNo(i,7);
Nd8=NodeNo(i,8);
u1=dofNo_UV(i,1); v1=dofNo_UV(i,2);
u2=dofNo_UV(i,3); v2=dofNo_UV(i,4);
u3=dofNo_UV(i,5); v3=dofNo_UV(i,6);
u4=dofNo_UV(i,7); v4=dofNo_UV(i,8);
u5=dofNo_UV(i,9); v5=dofNo_UV(i,10);
u6=dofNo_UV(i,11); v6=dofNo_UV(i,12);
u7=dofNo_UV(i,13); v7=dofNo_UV(i,14);
p1=dofNo_P(i,1);
p2=dofNo_P(i,2);
p3=dofNo_P(i,3);
p4=dofNo_P(i,4);
nodeXY_U(Nd1,3)=u1;
nodeXY_V(Nd1,3)=v1;
nodeXY_P(Nd1,3)=p1;
nodeXY_U(Nd2,3)=u2;
nodeXY_V(Nd2,3)=v2;
nodeXY_P(Nd2,3)=p2;
nodeXY_U(Nd3,3)=u3;
nodeXY_V(Nd3,3)=v3;
nodeXY_P(Nd3,3)=p3;
nodeXY_U(Nd4,3)=u4;
nodeXY_V(Nd4,3)=v4;
nodeXY_P(Nd4,3)=p4;
nodeXY_U(Nd5,3)=u5;
nodeXY_V(Nd5,3)=v5;
nodeXY_U(Nd6,3)=u6;
nodeXY_V(Nd6,3)=v6;
nodeXY_U(Nd7,3)=u7;
nodeXY_V(Nd7,3)=v7;
nodeXY_U(Nd8,3)=u8;
nodeXY_V(Nd8,3)=v8;
end
u1=DataU(1,1);
v1=DataU(2,1);
u2=DataU(3,1);
v2=DataU(4,1);
u3=DataU(5,1);
v3=DataU(6,1);
u4=DataU(7,1);
v4=DataU(8,1);
u5=DataU(9,1);
v5=DataU(10,1);
u6=DataU(11,1);
v6=DataU(12,1);
u7=DataU(13,1);
v7=DataU(14,1);
u8=DataU(15,1);
v8=DataU(16,1);
dof_rem=[];
count=0;
for i_rem=1:numVariables
iexis=0;
for ieli=1:size(dofloc_eliuv,1)
elival=dofloc_eliuv(ieli,1);
if i_rem==elival
iexis=1;
end
end
if iexis==0
count=count+1;
dof_rem(count,1)=i_rem;
end
end
unoteR=zeros(numVariables,1);
for i_unoteR=1:numVariables
for j_unoteR=1:size(dof_rem,1)
loc_R=dof_rem(j_unoteR,1);
if i_unoteR==loc_R