FE - Lectures2019 - 20 - Part 2 - 2 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

5.

ASSEMBLY AND BOUNDARY CONDITIONS

5.1 ASSEMBLING THE STIFFNESS MATRIX FOR 1-D BAR ELEMENTS


As an introduction to this section we will first consider how to assemble the stiffness matrix for a set of
one-dimensional bar elements, for which the element stiffness matrix is given;

E  A  1 1
kb  (5.1)
Le  1 1 

L1 L2 L3
E is constant
1 2 3 A is constant
1 2 3 4

Every element connected to a node contributes to the stiffness of that node; thus, node 1 has a
contribution from only element 1, whereas node 2 has contributions from both elements 1 and 2 etc.

EXERCISE 5.1. Matrix assembly for a set of bar elements.


Complete the assembled stiffness matrix for the set of 1D bar elements shown in the figure above,
such that

 P1   u1 
P  u 
 2   K bg  2 
 P3   u3 
   
 P4  u 4 

 1 1 
 L 0 0 
L1
 1 
 1 1 1 
 L  
L1 L 2
 EA 
1
K bg
 
 
 
 
 
 

73
5.2 ASSEMBLING THE GLOBAL STIFFNESS MATRIX FOR CONTINUUM ELEMENTS

The assembled stiffness matrix was expressed in Lecture 4 as follows;

K g   ΞeTK eΞe (5.2)


ne
Ke is the stiffness matrix of element e and  e the distribution matrix that relates element nodal variables
to total nodal variables. This matrix is not explicitly set up in the code, but the operations that it
represents are undertaken and are considered now. Consider the two element mesh used for the exercise
in session 4, as shown below. It may be seen that nodes 3 and 4 are common to elements 1 and 2, whilst
all other nodes belong only to one element. Thus, when the global stiffness matrix is assembled, the
rows and columns associated with nodes 3 and 4 will have contributions from both elements 1 and 2.

Each element stiffness matrix is set up as a local matrix, of size 8x8 in the present case, and an algorithm
is required to assemble the global matrix. Before explaining the algorithm, the assembly process for the
2 element mesh shown below is illustrated in a set of diagrams

2 4 6

1 3 5

74
Element assembly illustrated
_______________________________________________________________________________
Stiffness matrix for element 1

1 3 4 2 Global node references (G)


1 2 3 4 Local node references (L)
x y x y x y x y
1 1 u 1 L G
 Px1   k11 k12 k13 k14 k15 k16 k17 k18  x1  x
P   u 
 y1  k 21 k 22 k 23 k 24 k 25 k 26 k 27 k 28   y1  y 1 1
Px 2   k 31 k 32 k 33 k 34 k 35 k 36 k 37 k 38  u x 2  x
      2 3
Py 2  k 41 k 42 k 43 k 44 k 45 k 46 k 47 k 48  u y 2  y
 Px    k k 52 k 53 k 54 k 55 k 56 k 57 k 58  u x  x
 3   51   3 3 4
 Py 3  k 61 k 62 k 63 k 64 k 65 k 66 k 67 k 68  u y3  y
P   k k 72 k 73 k 74 k 75 k 76 k 77 k 78  u  x
 x 4   71   x4  4 2
Py 4   k 81 k 82 k 83 k 84 k 85 k 86 k 87 k 88  u y 4  y

Stiffness matrix for element 2


3 5 6 4 Global node references (G)
1 2 3 4 Local node references (L)
x y x y x y x y
2 2  u 2 L G
 Px1   k11 k12 k13 k14 k15 k16 k17 k18  x1 x
P  k u 
 y1   21 k 22 k 23 k 24 k 25 k 26 k 27 k 28   y1  y 1 3
Px 2   k 31 k 32 k 33 k 34 k 35 k 36 k 37 k 38  u x 2  x
      2 5
 Py 2  k 41 k 42 k 43 k 44 k 45 k 46 k 47 k 48  u y 2  y
 Px   u x 
 k 51 k 52 k 53 k 54 k 55 k 56 k 57 k 58  x
 3    3 3 6
 Py3  k 61 k 62 k 63 k 64 k 65 k 66 k 67 k 68   u y3  y
P  k k 72 k 73 k 74 k 75 k 76 k 77 k 78  u  x
 x4   71   x4  4 4
 Py 4   k81 k82 k83 k84 k85 k86 k87 k88  u y 4  y

Assembled global stiffness matrix


1 2 3 4 5 6 Global No.
x y x y x y x y x y x y
 Px1   k11 0   u x1 
1 k121 k171 k181 k131 k141 k151 k161 0 0 0 x
P   1   1
 y1  k 21 k 221 k 271 k 281 k 231 k 241 k 251 k 261 0 0 0 0   u y1  y
Px  k 711 k 721 k 771 k 781 k 731 k 741 k 751 k 761 0 0 0

0  u x 2  x
 2  1   2
 Py 2   k81 k821 k871 k881 k831 k841 k851 k861 0 0 0 0  u y 2  y
 Px   k k 321 k 371 k 381 k 33  k112
1 k 34  k122
1 k 35  k17 2
1 k 36  k182
1 k132 k142 k152

k162   u x 3  x
 3   31   3
 Py3  k 411 k 421 k 471 k 481 k 431  k 212 k 441  k 222 k 451  k 27 2 k 461  k 282 k 232 k 24 2 k 252 k 262   u y3  y
P    1  
 x 4   k 51 k 521 k 571 k 581 k 531  k 712 k 541  k 722 k 551  k 77 2 k 561  k 782 k 732 k 742 k 752 k 762  u x 4  x
 Py 4  k 1 k 621 k 671 k 681 k 631  k812 k 641  k822 k 651  k87 2 k 661  k882 k832 2 k852

k862   u y 4  y 4
 P   61
k84
 
 x5   0 0 0 0 k 312 k 322 k 37 2 k 382 k 332 k 342 k 352 k 362   u x 5  x
 Py5    u  5
   0 0 0 0 k 412 k 422 k 47 2 k 482 k 432 k 44 2 k 452 k 462   y5  y
 Px 6   0 0 0 0 k 512 k 522 k 57 2 k 582 k 532 k 542 k 552
 u
k 562   x 6  x
 Py    u  6
 6   0 0 0 0 k 612 k 622 k 67 2 k 682 k 632 k 64 2 k 652 k 662   y6  y

NOTE: The superscript is an element number not a power

75
EXERCISE 5.2. Exercise on linking local and global degrees of freedom

The link between global and local nodes is provided by the array topo
In the present case

topo=[1 3 4 2 ; <-- Element 1 topology


3 5 6 4 ] ; <-- Element 2 topology

If we loop over the nodes of an element iel i.e. for in=1:nn, then the global node number is
given by topo(iel,in)

Each node has two degrees of freedom id=1:2 OR id=1:nd (1 being associated with the x-direction
and 2 the y-direction)

If we have a list of global displacements (ug) , complete the section of Matlab code that extracts the
the element displacements (ue) from the list, assuming that the value of iel (the element number)
has already been set.

for in=1:nn

for id=1:nd

ie=

ig=

ue(ie)=ug(ig)

end

end

76
EXERCISE 5.3. ALGORITHM FOR ASSEMBLING GLOBAL STIFFNESS MATRIX

Complete the steps in the algorithm below


________________________________________________________________________________________________

function Kg=Kgmatx(nel,ntv,nn,nd,nev,ng,topo,xy,D,t)

% Form global stiffness matrix

% Loop elements and extract element stiffness matrix

Kg=zeros(ntv,ntv); Zero all global stiffness matrix

for iel=1:nel Loop elements

% Extract element nodal coordinates

xyel(1:nn,1:nd)=xy(topo(iel,1:nn),1:nd); Extract element coordinate

% Compute the current element stiffness matrix

Ke=Ematx(nev,ng,xyel,D,t); Compute current elem. Stiff. matrix

for in=1:nn Loop nodes per element by row

for id=1:nd Loop degrees of freedom per node by row

ie= Set row number in elem. stiffness matrix

ig= Set global row number

for jn=1:nn Loop nodes per element by column

for jd=1:nd Loop degrees of freedom per node by col

je= Set col number in elem. stiffness matrix

jg= Set global column number

Kg(ig,jg)= Add contribution from current element to


global stiffness matrix
end

end

end

end

end

77
5.3 BOUNDARY CONDITIONS

The global stiffness matrix when assembled is singular because it represents an unrestrained structure
with free body motions. This is readily illustrated for the case of two bar elements.

1 The assembled stiffness matrix takes the form (if the


2
length and properties of both bars are equal)
1 3
2  1 1 0 
EA 
K  1 2  1 (5.3)
L 
 0  1 1 
Remembering that rows (or columns) of the matrix have to be linearly independent for the matrix to be
positive definite, it may be seen that here the rows are not linearly independent because
(row1 + row3) + row2 = 0 (5.4)

Hence det(K)=0

Sufficient restraints are always needed to prevent all rigid body translations and rotations. For a 2D
continuous body (with no internal hinges) this means either 2 x-restraints and 1 y-restraint or 2 y-
restraints and 1 x-restraint, the former case being illustrated below.
x fixed

x & y fixed

A convenient way to apply these is to modify the row and column of the assembled stiffness matrix before
solving by making all elements of these row and columns zero, except for the diagonal element associated
with the restrained degrees of freedom. Then the right hand side is modified so it equals the Kdiagures for
the fixed degrees of freedom (rows) and for other rows the appropriate Kijures terms have to be subtracted
from the r.h.s.. Once the solution is complete, the reaction at a fixed degree of freedom may be calculated
by multiplying the row of the original stiffness matrix, associated with that degree of freedom, with the
newly computed displacement vector.

The steps are illustrated for the two element problem of section 5.2 with the restraints shown below.

x and y restraint at node 1 and y restraint at node 3


2 4 6

1 3 5

The modified stiffness matrix and load vector are illustrated below, in which, for example, ux1r denotes
the restrained value of the x displacement at node 1, which here is 0.
78
Modified stiffness and rhs vector. Note only non-zero components in original matrix shown
Restrained degrees of freedom.
1 1 3 Node
x y y Components
k1,1 0 0 0 0 0 0 0 0 0 0 0   u x1r   k11u x1r 
0     x 1
 k 2, 2 0 0 0 0 0 0 0 0 0 0  u y1r   k 22u y1r  y 1
0 0 k 3,3 k 3, 4 k 3,5 0 k 3,7 k 3,8 0 0 0 0   u x 2   Px 2  k 3,1u x1r  k 3, 2 u y1r  k 3,6u y3 r 
    
 0 0 k 4,3 k 4, 4 k 4,5 0 k 4, 7 k 4,8 0 0 0 0   u y 2  Py 2  k 4,1u x1r  k 4, 2 u y1r  k 4,6u y3 r 
0 0 k 5,3 k 5, 4 k 5,5 0 k 5,7 k 5,8 k 5,9 k 5,10 k 5,11 k 5,12   u x 3   Px 3  k 5,1u x1r  k 5, 2 u y1r  k 5,6u y3 r 
    
 0 0 0 0 0 k 6, 6 0 0 0 0 0 0  u y3 r   k66u y3 r 
 y 3
0 0 k 7 ,3 k 7, 4 k 7 ,5 0 k 7,7 k 7,8 k 7 ,9 k 7,10 k 7,11 k 7,12   u x 4  Px 4  k 7,1u x1r  k 7, 2 u y1r  k 7,6u y3 r 
    
0 0 k 8,3 k 8, 4 k 8,5 0 k 8,7 k 8,8 k 8,9 k 8,10 k 8,11 k 8,12   u y 4   Py 4  k 8,1u x1r  k 8, 2 u y1r  k 8,6u y3 r 
 0 0 0 0 k 9,5 0 k 9, 7 k 9,8 k 9,9 k 9,10 k 9,11 k 9,12   u x 5   Px 5  k 9,6u y3 r 

 
 0 0 0 0 k10,5 0 k10 ,7 k10,8 k10,9 k10,10 k10,11 k10 ,12   u y5   Py5  k10,6u y3 r 
    
 0 0 0 0 k11,5 0 k11,7 k11,8 k11,9 k11,10 k11,11 k11,12   u x 6   Px 6  k11,6u y3 r 
 0
 0 0 0 k12,5 0 k12 ,7 k12,8 k12,9 k12,10 k12,11 k12 ,12   u y 6   Py 6  k12,6u y3 r 

(5.4)
This may be expressed as

Kg u  Pg (5.5)
mod mod

Note, it is important to retain the original stiffness matrix, because this is needed to compute the
reactions, thus the matrix should be copied to one with a different name before it is modified.

The final step, the computation of reactions is illustrated below. Here the displacement vector will
include the restrained (or prescribed) values.

 k 1,1 k 1, 2 k 1,3 k 1, 4 k 1,5 k 1,6 k 1,7 k 1,8 0 0 0 0   u x1   R x1 


k    
 2,1 k 2, 2 k 2 ,3 k 2, 4 k 2,5 k 2, 6 k 2, 7 k 2,8 0 0 0 0   u y1   R y1 
 k 3,1 k 3, 2 k 3,3 k 3, 4 k 3,5 k 3,6 k 3,7 k 3,8 0 0 0 0  u x 2   Px 2 
    
k 4,1 k 4, 2 k 4 ,3 k 4, 4 k 4,5 k 4, 6 k 4, 7 k 4,8 0 0 0 0   u y2   Py 2 
 k 5,1 k 5, 2 k 5, 3 k 5, 4 k 5, 5 k 5,6 k 5,7 k 5,8 k 5,9 k 5,10 k 5,11 k 5,12   u x 3   Px 3 
    
k 6,1 k 6, 2 k 6 ,3 k 6, 4 k 6 ,5 k 6, 6 k 6, 7 k 6,8 k 6 ,9 k 6,10 k 6,11 k 6,12   u y3  R y3 

k k 7, 2 k 7 ,3 k 7, 4 k 7 ,5 k 7 ,6 k 7,7 k 7,8 k 7 ,9 k 7,10 k 7,11 k 7,12  u x 4   Px 4 
 7,1    
 k 8,1 k 8, 2 k 8,3 k 8, 4 k 8,5 k 8,6 k 8,7 k 8,8 k 8, 9 k 8,10 k 8,11 k 8,12   u y4   Py 4 
 0 0 0 0 k 9,5 k 9, 6 k 9, 7 k 9,8 k 9,9 k 9,10 k 9,11 k 9,12   u x 5   Px 5 
 
 0 0 0 0 k 10,5 k 10 ,6 k 10,7 k 10,8 k 10,9 k 10 ,10 k 10 ,11 k 10 ,12   u y5   Py5 
    
 0 0 0 0 k 11,5 k 11,6 k 11,7 k 11,8 k 11,9 k 11,10 k 11,11 k 11,12  u x 6   Px 6 
 0
 0 0 0 k 12,5 k 12 ,6 k 12,7 k 12,8 k 12,9 k 12 ,10 k 12 ,11 k 12 ,12   u y6   Py6 
(5.6)

for example, the x reaction at node 1 is given by

Kg row1 u = Rx1 (5.7)

Note: These operations are built into many solution routines and are carried out along with the reduction
of the equations.

79
EXERCISE 5.4. HOW THE RESTRAINTS ARE STORED

The restraints are stored in the following section of Matlab code, which has values set for the two
element problem shown below;

x and y restraint at node 1 and y restraint at node 3 (all zero-displacement restraints)


2 4 6

1 3 5

nf=2; % No of restrained nodes


nof=[1 3]; % List of nodes with fixities
ifp(1:nf,1:nd)=[1 1; % 1st fixed node codes, x then y (1 fixed, 0 free)
0 1]; % 2nd fixed node codes, x then y
pre(1:nf,1:nd)=0.0; % Prescribed displacements

-------------------------------------------------------------------------------------------------------------------------------

Show how the fixity data would change if the restraints were altered to those shown below;
x and y restraint at nodes 1 and 3 with zero displacement
a 0.01mm prescribed displacement in the y direction at node 6
2 4 6

1 3 5

80
MATLAB WORKSHEET 5.

Part a
Develop a MATLAB program to compute the global stiffness matrix for a mesh of 4-noded finite elements
and compute the modified stiffness matrix and load vector required to apply fixities (prescribed
displacements).
The master script is similar to that used in Exercise 4 for the element stiffness matrix except that there
is now an element loop inside the function m-file that computes the global stiffness matrix. The program
should use the scripts already developed for the shape functions, D-matrix, B-matrix & Jacobian and Ke
matrices. These will need to be transferred into the folder you create for this week’s exercise.
Templates for the master, global stiffness matrix and boundary condition scripts are given below. Data
for the two element problem shown below are given in the code.

Fixities to nodes 1, 2 and 4 Forces in x direction to nodes


5 and 6
2 4 6 1.0x106 E=80000
=0.25
t=8.0

0.8x106
1 3 5

Part b
Modify your code such that it has the option to select a set of loads and boundary conditions that are
amenable to checking with a hand calculation. Undertake the check.
You will be asked to show your hand calculation.

81
%-------------------------------------------------------------------------
% First finite element program
%-------------------------------------------------------------------------
clear ; clc ; % Clear memory
%----------- Set integer constants
nn=4; nd=2; ns=3; ng=4;
%---------- Mesh data
% Set global data
nel=2 ; np=6; npl=2;
% Derived variables
ntv=np*nd; nev=nn*nd;
% Nodal coordinates
xy=[0.0 0.0 ;
0.0 200.0 ;
200.0 0.0 ;
200.0 200.0 ;
400.0 0.0 ;
400.0 200.0 ] ;
% Element topology
topo=[1 3 4 2 ;
3 5 6 4 ] ;
% Material properties and thickness
E=80000.0 ; nu=0.25; t=8.0;
% Set fixity arrays
nf=3; % No of restrained nodes
nof=[1 2 4]; % List of nodes with fixities
ifp(1:nf,1:nd)=[1 1; % 1st fixed node codes, x then y (1 fixed, 0 free)
1 0; % 2nd fixed node codes, x then y
0 1]; % 3rd fixed node codes, x then y
pre(1:nf,1:nd)=0.0; % Prescribed displacements
% Global load array
fxy(1:ntv)=0; % Initialise load array
fxy(9)=0.8e6; fxy(11)=1.0e6; % x force to nodes 5 & 6
% Compute D-matrix
D=dmatx(E,nu);
% Assemble the global stiffness matrix
Kg=Kgmatx(nel,ntv,nn,nd,nev,ng,topo,xy,D,t);
% Apply boundary conditions
[rhsm,Kgm]=BoundC(ntv,nd,nf,nof,ifp,pre,Kg,fxy);
% Solve equations
ug=Kgm\rhsm';
disp('Global displacements')
disp(ug)

82
function Kg=Kgmatx(nel,ntv,nn,nd,nev,ng,topo,xy,D,t)
% Form global stiffness matrix
% Loop elements and extract element stiffness matrix
Kg=zeros(ntv,ntv);
for iel=1:nel
% Extract element nodal coordinates
xyel(1:nn,1:nd)=xy(topo(iel,1:nn),1:nd);
% Compute the current element stiffness matrix
Ke=Ematx(nev,ng,xyel,D,t);
for in=1:nn
for id=1:nd
ie= ???
ig=???
for jn=1:nn
for jd=1:nd
je= ???
jg= ???
Kg(ig,jg)= ???
end
end
end
end
end
---------------------------------------------------------------------
function [rhsm,Kgm]=BoundC(ntv,nd,nf,nof,ifp,pre,Kg,fxy)
% Apply boundary conditions
rhsm=fxy; Kgm=Kg;
% Modify r.h.s. for fixed d.o.f, then zero associated row and column ;
% set diagonal term of fixed dof to original value and modify rhs
for iv=1:nf;
:
:
:
:
end

83
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
84
6. COMPUTING STRESSES. INPUT AND OUTPUT
6.1 COMPUTING STRESSES
EXERCISE 6.1. Write the equation for computing strains from the element nodal displacements (ue);
(6.1)
---------------------------------------------------------------------------------------------------------------------------------------
and the equation for computing stresses from the D-matrix and element nodal displacements (ue)
(6.2)
---------------------------------------------------------------------------------------------------------------------------------------

EXERCISE 6.2.
Write out the steps involved in computing stresses at the Gauss points
It is noted that there is much common between this algorithm and that for computing the element
stiffness matrix (Section 4.4)

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

85
6.2 Extrapolating stresses
In theory, the stresses could be computed anywhere in an element but it so happens that the most
accurate positions to compute stresses are at the Gaussian integration points for two and three
dimensional isoparametric elements (Hinton and Campbell, 1974)*. The reason for this is that the
displacement derivatives, and therefore stresses and strains, can be inaccurate near the boundaries of
elements; therefore, it is normal for stresses to be computed at the Gauss points, extrapolated to the
nodes and then averaged.

The extrapolation procedure involves local least squares smoothing. In this theory it is assumed that the
minimum error occurs when the integral of the weighted ‘smoothed’ stresses across the element matches
the integral of the local stresses across the element.

The local ‘smoothed’ interpolated stresses are given by;


nn
σ n   Ni σ n i (6.3)
i 1

in which σ n i are the nodal stress values (yet to be determined)

The minimum error is then given by,

 Ni N jσ j dVe   Niσ dVe


n gp
(6.4)
Ve Ve
assuming that the summation convention applies to subscript j.

For a 4-noded isoparametric plane element, equation (6.4) becomes;

  N1N1 det Jdd ... ...  N1N 4 det Jdd    1    N1 det Jdd 
n gp

  :   
 : :   

:  (6.5)
 : :  :   : 
  n   
  N 4 N1 det Jdd ... ...  N 4 N 4 det Jdd  4    N 4 gp det Jdd

If detJ does not vary across an element, as is the case when 4-noded elements are rectangles or regular
parallelograms, then detJ may be cancelled out of the equations. The integrals and inversion are then
independent of the element size which means that these only have to be undertaken once. This leads to
the following matrix equation;

 n1   3 1 3 1   gp1 
  1  1   
   2 2 2 2  
 n   1 3 1 3   gp 
 2   1 1   2 
  2 2 2 2   (6.6)
   3 1 3 1   
 n 3  1  1   gp3 
   2 2 2 2  
   1 3 1 3   
n   1 1   gp 
 4  2 2 2 2  4

in which gp1 is a stress component at gauss point (e.g. xx@gp1) and n1 is a nodal stress component
(e.g. xx@node1). The matrix equations are solved for all required stress components.

* For quadratic elements it is the points of a reduced integration rule that prove the optimum locations
86
EXERCISE 6.3.
For the two element problem illustrated below, the stresses at the gauss points of element 1 are those
given below;

gp4 gp3

gp1 gp2

Elem G.P. x-coord y-coord xx-stres yy-stres xy-stres princ1 princ2


1 1 21.132 21.132 807.653 30.404 6.654 807.710 30.347
1 2 78.868 21.132 724.446 -246.951 590.420 1003.273 -525.777
1 3 78.868 78.868 2392.347 253.420 493.346 2500.654 145.113
1 4 21.132 78.868 2475.554 530.774 -90.420 2479.748 526.579

Complete the equation below that gives the extrapolated xx-stresses for element 1 at local nodes
1,2,3,4 which correspond with global nodes 1,3,4,2 respectively

 1 1   807.653 
 227.615  1  3 1
3

   2 2 2 2  
    
 83.496   1 3  1 3
1 1   724.446 
   2 2 2 2  
 
   
 2972.385  1  3 1 3 1  
1  2392.347 
   2 2 2 2  
     
 ________    
  2475.554 
1 3 1 3
  1 1
 2 2 2 2 

87
6.3 PREPROCESSING AND DATA INPUT
Thus far, the data required by the MATLAB finite element program has been included in the main script.
However, it is advantageous to be able to prepare the data separately in a text file and then for the
MATLAB program to read that file. This opens the possibility of another program, a pre-processor, being
used to prepare the data.

Data for nearly all commercial finite element analyses are prepared with pre-processors, which are often
integrated with the solution and post-processing routines (see 6.4). There are a number third party pre and
post processors available, that may be linked with a user defined program e.g. http://gid.cimne.upc.es/

Plotting a mesh is essential when finding errors, and therefore a mesh plotter will be developed as part of
the developed program.

88
6.3.1 Form of data file
The structure of the data to be entered is as follows; which serves as a manual for the preparation of the data file.

Line 1 Title
Title: Up to 70 alphanumeric characters including spaces (don’t forget this title line)

Line 2 Control set. 1 line only


np Number of nodal points
ne Number of elements
nf Number of fixed nodes
npl Number of nodes with point loads applied (note this l in ‘npl’ is lower case L)

Line set 3 Element topology. nel lines of data


iel Element number
topo(iel,1) Global number of local node 1
topo(iel,2) Global number of local node 2
topo(iel,3) Global number of local node 3
topo(iel,4) Global number of local node 4

Line set 4 Node coordinates. np lines of data


lp Node number
xy(lp,1) x coordinate of node lp
xy(lp,2) y coordinate of node lp

Line set 5 Material data. 1 line only


E Young’s modulus
nu Poisson’s ratio
t Out of plane thickness

Line set 6 Fixed nodes. nf lines of data


nof(iv) fixed node number for the ivth fixed node
ifp(iv,1) x fixity code (1=fixed, 0=free)
ifp (iv,2) y fixity code (1=fixed, 0=free)
pre (iv,1) x prescribed displacement
pre (iv,2) y prescribed displacement

Line set 7 Load data. npl lines of data


lp (i) Node number
fxy(1) Force in x direction
fxy(2) Force in y direction

89
Example data file

File Explanation
Example finite element data file Title
6 2 2 2 Control data
1 1 3 4 2 Topology (2 elements)
2 3 5 6 4
1 0.0 0.0 Node coordinates (6 nodes)
2 0.0 200.0
3 200.0 0.0
4 200.0 200.0
5 400.0 0.0
6 400.0 200.0
200000.0 0.3 10.0 Material data
1 1 1 0.0 0.0 Fixed node data (2 fixed nodes)
2 1 0 0.0 0.0
5 1.0e6 0.0 Nodal forces (2 loaded nodes)
6 1.5e6 0.0

y
450

400

350 Node number

300
Element number
250

200 2 4 6 1.5x106

150

100 1 2

50

0 1 3 5 1.0x106

-50 x
-50 0 50 100 150 200 250 300 350 400 450

Note:
Element topology: Node numbers should be in an anticlockwise order

90
6.4 RESULTS OUTPUT AND POST-PROCESSING
In any programming it is important to arrange the output in a logical and easy to read format. In the case
of a finite element program, the output file should contain a record of the input data, the nodal
displacements, reactions, gauss point and/or nodal stresses and, for nonlinear problems, state variables at
the same locations as the stresses (e.g. plastic strains). The amount of output arising from a full-scale finite
element analysis is too great to be printed and such output does not provide a cogent description of the
results. Thus, the results are post-processed and results presented graphically. An example from such
output was shown in Lecture 2. Other common features include the ability to plot graphs of variables at a
chosen range of points (nodes or gauss points). A limited post-processor will be included in the program
developed.

In the present case, relatively small meshes will be used and therefore output files will not be too great to
be comprehended in printed form. An example of the output from the program developed is given overleaf.

91
Output from a different two element problem from that given in the previous data file.
_______________________________________________________________________________
Title : Two Element problem

Control data
Number of nodal points = 6
Number of elements = 2
Number of fixed nodes = 3
Number of loaded nodes = 1

Elem Nodes
1 1 2 5 4
2 2 3 6 5

Node Coords
1 0.000 0.000
2 85.000 0.000
3 170.000 0.000
4 0.000 100.000
5 85.000 100.000
6 170.000 100.000

Material properties
Young Poiss Thick
10000.00 0.200 10.000

Node Codes Prescribed values


1 1 1 0.00000 0.00000
2 1 1 0.00000 0.00000
3 1 1 0.00000 0.00000

Node Px Py
6 3000.00 2000.00

Results

Node x-disp ydisp


1 0.000 0.000
2 0.000 0.000
3 0.000 0.000
4 0.026 0.013
5 0.033 0.003
6 0.075 0.014

Element stresses
Elem G.P. x-coord y-coord xx-stres yy-stres xy-stres princ1 princ2
1 1 17.963 21.132 0.423 1.148 1.036 1.883 -0.312
1 2 67.037 21.132 0.311 0.588 1.224 1.681 -0.782
1 3 67.037 78.868 0.863 0.698 0.960 1.744 -0.183
1 4 17.963 78.868 0.975 1.258 0.773 1.902 0.331
2 1 102.963 21.132 1.201 0.802 1.872 2.884 -0.881
2 2 152.037 21.132 1.333 1.466 2.878 4.279 -1.479
2 3 152.037 78.868 4.293 2.058 3.191 6.557 -0.205
2 4 102.963 78.868 4.161 1.394 2.184 5.363 0.192
_______________________________________________________________________________

92
MATLAB WORKSHEET 6
ASSESSED EXERCISE

The tasks this week are to;


(i) Develop an m-file for computing the stresses. You will need to add the function for computing
principal stresses used in Matlab Worksheet 2.
(ii) Put together the complete F.E. program from the m-files provided. The templates are
provided for the Master, input, output and plotting functions (also given on Learning Central).
(iii) Run the cantilever problem given below and check the results against an analytical solution
obtained using engineering beam theory.
(iv) Prepare an answer for why the FE and analytical solutions are different from each other.

Two optional extra pieces of work, which do not carry any marks, are;
a) Work out how to use the same plotting function to display an exaggerated deformed mesh.
b) Implement the stress extrapolation method (this may be quite difficult).

CANTILEVER PROBLEM
Prepare a data file for the cantilever mesh shown below and check how close the answers are to those
from beam theory. Note, the data given are dimensionless and it is up to the user to use a consistent set
of units. Here the values are consistent with N,mm units

Thickness = 50
E = 100 000
1200  = 0.25
Applied end moment
= 20x106

200

93
NOTES ON STRESS COMPUTATION M-FILE.
The algorithm for this function m-file is provided in section 6.1. Many of the steps are common to
the element stiffness matrix m-file. It is necessary now to extract not only the element coordinates
but also the element nodal displacements. There is a loop over all elements and then a loop over the
gauss points within an element. There is a variable which denotes the total gauss point number called
lgp, noting that lgp will finally be equal to nel*ng. The gauss point stress array records the three
Cartesian components and the two principal stress components for each gauss point (lgp) and is thus
a 5 x lgp array.

NOTES ON M-FILE TO READ DATA (readdata.m)


Connecting to input and output files
The first main step in this m-file is to create a link between the data and output files. This is
accomplished with the commands

% Set path to data file


name=input('input mesh file name (no extension, data should in *.dat)--> ','s');
iname=strcat('Data\',name,'.dat'); % Input file should have an extension .dat
oname=strcat('Data\',name,'.out'); % Output file should have an extension .out
ifile=fopen(iname);
ofile=fopen(oname,'wt');

ifile and ofile then contain numbers which may be used to say which file is being read from or
written to, respectively. It will be necessary for you to change the path to that for your data and
output files.

The ‘wt’ in the 2nd fopen commands indicates that the file will be written to only in text format. If
this parameter is omitted the file may be read from or written to.

Commands for reading from data file


MATLAB contains a number of commands for reading from data files, but if the lines to be read
contain a mixture of characters and numbers and have different layouts the best approach is to use
the textscan function. This, however, is not the simplest function to use. The syntax of the function
is as follows

C = textscan(fid, 'format', N)

C is the cell or array that the data is read into


Once the data is in a cell it has to be converted to a variable by using curly brackets.
fid is the file identifier, which is ifile in this case
'format' says what form to expect the numbers, e.g.
%d refers to an integer (whole number), which is used for node numbers, number of elements etc.
&f is used for floating point numbers (numbers with decimal points and powers of 10), such as
coordinates, material properties

94
An example from the input file that reads the coordinate data is as follows (with print commands
omitted);
for i=1:np;
lcoord=textscan(ifile,'%d %f %f',1);
ip=lcoord{1}; xy(i,1)=lcoord{2}; xy(i,2)=lcoord{3};

end
This will read each line of the coordinate data e.g.
1 0.0 0.0
2 0.0 200.0
3 200.0 0.0

There is a loop over the number of points and then for each point the whole line is read into
lcoord which will then contain 3 cells, the first with an integer number (node number) and the
next two with floating point (or real) numbers (the x and y coordinates of that point)
The cells are then converted to the appropriate variables ip, xy(i,1) and xy(i,2), using curly
brackets. Note that here, i=ip.

Formatting output with fprintf


fprintf(fid,format,A,...)

fidis the file identifier, which is ofile in this case


format governs how the output will appear, e.g. how many significant figures are to be printed,
whether output the number is in standard form e.g. 13003.4 or Exponent form 13.0034E3 etc.
An example from the section which writes out each line of coordinate data is as follows;
fprintf(ofile,'%3i %8.3f %8.3f\n', ip,xy(i,:) );
The format here is '%3i %8.3f %8.3f\n'
which says write the first number as an integer %3i allowing up to 3 columns, then there are 3
spaces, then the next number is to be output as a floating point number within 8 columns and with
3 numbers after the decimal point %8.3f, then there are two spaces and then another floating point
with the same format. The \n means carriage return (go to the next line).
A is the list of variables to be output according to the supplied format. Here these are ip and
xy(ip,:) noting this outputs both xy(ip,1) and xy(ip,2).

NOTES ON OUTPUT M-FILE (output.m)


The command used to print output is fprintf, which was used in readdata.m.
Note that the nodal displacements are contained in a single array ug and therefore it is necessary
to extract the appropriate values for each node, which is does with ig1 and ig2 variables. Similarly,
the appropriate value of the global gauss point counter lgp has to be used.
See also the note after the routine to replace the gauss point number with gauss point coordinates.

General
Look up the syntax of all of these commands using MATLAB help

95
Template for stress calculation function m-file

function [sig,xygp]=Stresses(ns,nd,ng,nn,nev,nel,xy,topo,ug,D)
% Initialise stress and gauss point coordinate arrays
sig(1:nd+ns,1:nel*ng)=0.0;
xygp(1:nd, 1:nel*ng)=0.0;
ue(1:nev)=0.0;
% Set gauss point positions
c=0.577350269189626;
pgp=[-c -c ; c -c ; c c ; -c c] ;
% Initialise global gauss point counter
lgp=0;
% Loop over all elements
for iel=1:nel
% Extract element nodal coordinates
Missing code
% Extract element nodal displacements
Missing code
% Loop over gauss points
for ig=1:ng
lgp=lgp+1;
Missing code
:
:
stn= ??? % Cartesian strains
str=??? % Cartesian stresses
[prs,~] = ??? % Principal stresses
sig(1:ns,lgp)=str(1:ns); % Record stresses global array
sig(ns+1:ns+nd,lgp)=prs; % Record princ stresses in global array
xygp(:,lgp)=shp*xyel; % Compute Gauss point coordinates
end
end

96
Function m-file for reading input data
Function [nd,ns,nn,nev,ng,nel,np,nf,ntv,ngt,topo, …
xy,E,nu,t,xylim,nof,ifp,pre,fxy,ofile]=Readat
%-------------------------------------------------------------------------
% Read and echo data and set key control variables
%-------------------------------------------------------------------------
% Set number of dimensions, nodes per element etc.
nd=2; ns=3; nn=4; nev=nn*nd; ng=4;
% Set path to data file
name=input('input mesh file name (no extension, data should in *.dat)--> ','s');
iname=strcat('Data\',name,'.dat'); % Input file should have an extension .dat
oname=strcat('Data\',name,'.out'); % Output file should have an extension .out
ifile=fopen(iname);
ofile=fopen(oname,'wt');
% ofile=1 ; % Write to screen option
% Read title
mtitle=textscan(ifile,'%s',1,'endofline','\r\n','delimiter','\r\n');
fprintf(ofile,'Title : '); titl=char(mtitle{1}); fprintf(ofile,'%s',titl);
% Read control parameters
nin=textscan(ifile,'%d %d %d %d ',1);
np=nin{1}; nel=nin{2}; nf=nin{3}; npl=nin{4};
fprintf(ofile,'\n\nControl data \n');
fprintf(ofile,'Number of nodal points = %4i\n',np);
fprintf(ofile,'Number of elements = %4i\n',nel);
fprintf(ofile,'Number of fixed nodes = %4i\n',nf);
fprintf(ofile,'Number of loaded nodes = %4i\n',npl);
ntv=np*nd; % Total number of degrees of freedom
ngt=nel*ng; % Total number of gauss points in total mesh
% Initialise various arrays
topo=zeros(nel,nn); xy=zeros(np,nd); xylim(1:4)=0.0; fxy(1:ntv)=0.0;
nof(1:nf)=0.0 ; ifp=zeros(nf,nd) ; pre=zeros(nf,nd) ;
% Read and echo element topology
fprintf(ofile,'\nElem Nodes\n');
for iel=1:nel
Ctopo=textscan(ifile,'%d %d %d %d %d',1);
jel=Ctopo{1} ;
for in=1:nn
topo(jel,in)=Ctopo{in+1};
end
fprintf(ofile,'%3i %8i %4i %4i %4i\n', iel, topo(iel,:));
end
% Read coordinates
fprintf(ofile,'\nNode Coords\n');
for i=1:np;
lcoord=textscan(ifile,'%d %f %f',1);
ip=lcoord{1}; xy(i,1)=lcoord{2}; xy(i,2)=lcoord{3};
fprintf(ofile,'%3i %8.3f %8.3f\n', ip,xy(i,:) );
end
% Set max and min coords
xylim=[min(xy(:,1)) min(xy(:,2)) max(xy(:,1)) max(xy(:,2))];
% Material properties
fprintf(ofile,'\nMaterial properties\n');
fprintf(ofile,'Young Poiss Thick\n');
lmat=textscan(ifile,'%f %f %f',1);
E=lmat{1} ; nu=lmat{2} ; t=lmat{3};
fprintf(ofile,'%9.2f %4.3f %8.3f\n',E,nu,t) ;
% fixed and prescribed nodes, first initialising arrays
fprintf(ofile,'\nNode Codes Prescribed values\n');
for i=1:nf;
lfx=textscan(ifile,'%d %d %d %f %f',1);
nof(i)=lfx{1} ;
ifp(i,1)=lfx{2} ; ifp(i,2)=lfx{3};
pre(i,1)=lfx{4} ; pre(i,2)=lfx{5};

97
fprintf(ofile,'%3i %2i %2i %8.5f %8.5f \n', ...
nof(i),ifp(i,1:nd),pre(i,1:nd));
end
% Read nodal loads and put them in the force array
fprintf(ofile,'\nNode Px Py\n');
for i=1:npl;
lpt=textscan(ifile,'%d %f %f',1);
ip=lpt{1} ; ipx=(ip-1)*nd+1 ; ipy=ipx+1 ;
fxy(ipx) = lpt{2} ; fxy(ipy)=lpt{3};
fprintf(ofile,'%3i %9.2f %9.2f\n',ip,fxy(ipx:ipy));
end
________________________________________________________________________________

98
Function mfile for writing results to output file
________________________________________________________________________________
function Output(ofile,ng,nd,np,nel,ug,sig,xygp)
%--------------------------------------------------------------------------
% write output to file
%--------------------------------------------------------------------------
% Write displacements
fprintf(ofile,'\n\n\nResults');
fprintf(ofile,'\n\nNode x-disp ydisp\n');
for ip=1:np;
ig1=(ip-1)*nd+1 ; ig2=ig1+1;
fprintf(ofile,'%4i %6.3f %6.3f\n',ip,ug(ig1:ig2));
end
% Write stresses
fprintf(ofile,'\nElement stresses\n');
fprintf(ofile,'Elem G.P. x-coord y-coord xx-stres yy-stres xy-stres
princ1 princ2\n');
for iel=1:nel;
for ig=1:ng;
lgp=(iel-1)*ng+ig;
fprintf(ofile,'%4i %2i %9.3f %9.3f %9.3f %9.3f %9.3f %9.3f
%9.3f\n',...
iel,ig,xygp(:,lgp),sig(:,lgp));
end
end
________________________________________________________________________________

Function mfile for plotting mesh

function plotmesh(nel,nn,topo,xy,xylim)
%--------------------------------------------------------------------------
% Plot the finite element mesh
%--------------------------------------------------------------------------
scrsz = get(0,'ScreenSize');
bsz=max([xylim(3)-xylim(1) xylim(4)-xylim(2)]) ; % plot box size=max(Dx,Dy)
figure('Position',[scrsz(3)/5 scrsz(4)/5 scrsz(3)/1.5 scrsz(4)/1.5]);
bsz=1.05*bsz ; % add margin
% Centre of mesh
xcen=0.5*(xylim(1)+xylim(3)) ; ycen=0.5*(xylim(2)+xylim(4)) ;
% plot background box
xb=[xcen-bsz/2 xcen+bsz/2] ; yb=[ycen-bsz/2 ycen+bsz/2] ;
rect=[xb(1) yb(1) ; xb(2) yb(1) ; xb(2) yb(2) ; xb(1) yb(2)];
C=[1 1 1] ; % Set backgorund colour
patch(rect(:,1),rect(:,2),C,'edgecolor',C);
% Plot elements
C=[0.9 1.0 0.9] ; % Set colour using RGB cube
for iel=1:nel;
x(1:nn)=xy(topo(iel,1:nn),1) ;
y(1:nn)=xy(topo(iel,1:nn),2) ;
patch(x,y,C) ; % plot element
text(mean(x),mean(y),num2str(iel),'fontsize',9) ; % wrt. elem
for i=1:nn ;
text(x(i),y(i),num2str(topo(iel,i)),'fontsize',8) ; % wrt. node
end
end

99
FEProg.m. Master script for finite element program
________________________________________________________________________________
% PLANE STRESS FINITE ELEMENT CODE.
clear ; clc ;
% Read data file and set local and global variables
[nd,ns,nn,nev,ng,nel,np,nf,ntv,ngt,topo,xy,E,nu,t,xylim,nof,ifp,pre,fxy,ofile]=Read
at;
% Plot the mesh
plotmesh(nel,nn,topo,xy,xylim)
% Compute D-matrix
D=dmatx(E,nu);
% Form stiffness matrix
Kg=Kgmatx(nel,ntv,nn,nd,nev,ng,topo,xy,D,t);
% Apply boundary conditions
[rhsm,Kgm]=BoundC(ntv,nd,nf,nof,ifp,pre,Kg,fxy);
% Solve equations
ug=Kgm\rhsm';
% Compute stresses at gauss points for all elements
[sig,xygp]=Stresses(ns,nd,ng,nn,nev,nel,xy,topo,ug,D);
% Output the results
Output(ofile,ng,nd,np,nel,ug,sig,xygp)

100
6A. APPENDIX TO LECTURE 6. EXPLANATION OF ELEMENT PLOTTING IN MATLAB

MATLAB, and most graphics packages, allow polyhedral shapes to be plotted with a single command,
however, these may not scale evenly in x and y directions or centre objects as required. Therefore a basic
algorithm is presented which achieves both of these conditions.

One way to ensure that x and y are scaled equally in MATLAB is to plot a square box around the object.
With reference to the figure below, Dbx and the coordinates of its corners may be calculated as follows;

x =xmax-xmin and y=ymax-ymin in the code colim = [xmin,ymin,xmax,ymax]

W = greater of x and y

Dbx = W*1.05 add margin

xcen=xmin+x/2 and ycen = ymin+y/2 the coordinates of the centre of the mesh plot box

The coordinates of the 4 corners of the plotting box, which ensure the object is central to the window
but retains its original coordinates, are as follows;

(xb1, yb1) (xb 2 , yb1) (xb 2 , yb 2 ) (xb1, yb 2 )

where

xb1 = xcen-Dbx/2 ; yb1 = ycen-Dbx/2 , xb2 = xcen+Dbx/2 ; yb2 = ycen+Dbx/2

y
Dbx
(xb1 , yb2) (xb2 , yb2)

(xmax,ymax)
Object window, from
(xmin,ymin) to (xmax,ymax )

Dbx

(xmin,ymin)

(xb1 , yb1) (xb2 , yb1)

mg = margin in both x and y x

A box may then be plotted using the patch function.

101
Once the box is plotted all the elements may be plotted as follows;

for iel=1:nel
Extract the x and y coords of the 4 corners of each element and store in local arrays x and y,
plot the element using the patch function
End

Check the syntax of patch using MATLAB help

Element numbers and node numbers may be added using the text function. Again, check the syntax
using MATLAB help.

102
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

103
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

104
7. DIFFERENT FORMS OF ELEMENT

7.1 LINEAR TRIANGLES


Linear triangular elements were the first to be used in finite element calculations. Triangles are convenient
for meshing irregular shapes and simple to implement. The shape functions for the elements are given
below, where the local coordinates run from 0 to 1


Shape functions
1 Local node numbers N1  1    
3
N2  
N3  

1 2
0 1 

Triangular elements require different integration rules from quadrilateral elements (see Sec 7.4).

EXERCISE 7.1.
Assuming that the Cartesian and local coordinates are the same, compute the strain in a linear triangle
 0 0 
if the nodal displacements are e 
u  0.001 0 
 
 0 0.002 
--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

105
Why doesn’t it matter where the strains are evaluated within the element ?
--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

What does this imply about the accuracy of the element ?

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

106
7.2 QUADRATIC ONE-DIMENSIONAL ELEMENT
Quadratic elements allow the simulation of linearly varying strain fields across elements. The shape
functions for a one-dimensional quadratic finite element are given below.

 
N1 ()     1 ; N 2 ()    1  1   ; N 3 ()     1
2 2
 Le
x
-1 0 +1

1 2 3 Local node numbers 1 2 3

Element in local coordinates Element in Cartesian coordinates


Length Le: Mid-side node is central

EXERCISE 7.2.
Sketch the three shape functions.

N1 N2 N3
1

  
-1 +1 -1 +1 -1 +1

107
EXERCISE 7.3.
Expand the element interpolation to give a single expression for u, the displacement at a point , within
the element and use this to find an expression for the strain , assuming that the element in Cartesian
coordinates is of length Le and that the mid-node is central.

 2    2  
u= 
 2 2
 

  u1  1  2 u 2   
 u
 2 2 3
 

=

--------------------------------------------------------------------------------------------------------------------------------------

7.3 2D-QUADRATIC ELEMENTS


As mentioned above, quadratic elements allow the simulation of linearly varying strain fields across
elements and are much more accurate and economical than linear elements; however, quadratic elements
are generally less amenable to automatic meshing and can present difficulties when simulating problems
with cracking (or strain softening). The advice here is that if the problem can be solved with quadratic
elements, then quadratic elements should be used. By far the most popular elements in 2D are the 8-noded
quad and the 6 noded triangle, which are illustrated below.

 
7 6 +1 5 1 Local node numbers
5

-1 +1
 6 4
8 4

1 2 3
1 -1 2 3 0 1 
8 noded element in local domain 6 noded element in local domain

y y

x x

8 noded element in global domain 6 noded element in global domain

108
Shape functions for 8-noded quadrilateral

Ni 
1
1  i1  ii  i  1 for nodes i  1,3,5,7
4
2
 2
  
N i  i 1  i   1  2  i 1  i  1   2 for nodes i  2,4,6,8
2 2

EXERCISE 7.4.
Write out the full functions for N1 and N2

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

Shape functions for 6-noded triangle

t 1   
N1  2t  1t
N 2  4 t
N 3  2  1
N 4  4
N 5  2  1
N 6  4 t

It is worth noting that the way the finite element code in this course has been developed, very few changes
would be required to implement one of the above elements. If the code were generalised to deal with
different sorts of elements, then the number of nodes per element and the Gauss point rules would need to
become variables that depend on element type.

109
7.4 INTEGRATION RULES FOR TRIANGULAR ELEMENTS
The same basic numerical integration procedures used for rectangular elements (Section 3.2) are
applicable to triangular elements, except that the integration rules used are not the Gauss-Legendre rules
but the Radau rules. The sampling points and weights for 1 and 3 point Radau rules are given below (the
next in the series would be the 7 point rule).

No. points Radau point i   Wi


1 1 1/3 1/3 1/2
3 1 1/2 0 1/6
2 1/2 1/2 1/6
3 0 1/2 1/6

7.5 COUPLED ELEMENTS FOR MODELLING CONSOLIDATION IN SOIL MECHANICS


In undrained problems in soil mechanics it is necessary to simulate both the effectives stresses ’ and the
pore water pressure p, noting that the total stress is given by;

σ  σ ' pm

1 
1 
in which (in 3D)  
1 
m 
0
0
 
0

EXERCISE 7.5.
Why does the m vector only contain non-zero terms for the xx, yy and zz components ?
--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

A Darcy-flow analysis is undertaken for the pore fluid and a conventional deformation analysis undertaken
for the soil skeleton. The problem is coupled because the deformations affect the pore pressures and the
pore pressures affect the deformations. A common practice is to use a different order of interpolation for
the pore fluid from that used for the displacements, thus;

n pr nn
pe   N pri pi and ue   Niui
i 1 i 1

The shape functions used to interpolate the pore pressure (Npr) are normally an order below those used to
interpolate the displacements (Ni). Why ?

110
--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------

Mid-side nodes have


y only displacement
degrees of freedom

Corner nodes have


displacement and
x pore pressure
degrees of freedom

Coupled 4-node 8-node element


for consolidation analysis

111
COURSEWORK
The coursework will be given on a separate sheet.

An optional extra piece of work is to add a contouring function to your program. This will require the
addition of a Matlab function called fecontour, a call to fecontour in the master program (see below),
plus the replacement of the existing stress and output Matlab files with the revised versions on
Blackboard. All the necessary files are on Learning Central.
---------------------------------------------------------------------------------------------------------------------------------------
% PLANE STRESS FINITE ELEMENT CODE.
clear ; clc ; close('all')
% Read data file and set local and global variables
[nd,ns,nn,nev,ng,nel,np,nf,ntv,ngt,topo,xy,E,nu,t,xylim,nof,ifp,pre,fxy,ofile]=Read
at;
% Plot the mesh
plotmesh(nel,nn,topo,xy,xylim)
% Compute D-matrix
D=dmatx(E,nu);
% Form stiffness matrix
Kg=Kgmatx(nel,ntv,nn,nd,nev,ng,topo,xy,D,t);
% Apply boundary conditions
[rhsm,Kgm]=BoundC(ntv,nd,nf,nof,ifp,pre,Kg,fxy);
% Solve equations
ug=Kgm\rhsm';
% Compute stresses at gauss points for all elements
[sig,xygp,stnod]=Stresses(ns,nd,ng,nn,nev,np,nel,xy,topo,ug,D);
% Output the results
Output(ofile,ng,nd,np,nel,ug,sig,xygp,stnod)
% Plot deformed mesh
plotdmesh(np,nel,nn,nd,topo,xy,xylim,ug)
% Plot contours
fecontour(nn,nd,np,nel,xy,xylim,topo,ug,stnod)

112
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

113
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

114
8. SOLVING LINEAR ALGEBRAIC EQUATIONS

8.1 TECHNIQUES FOR SOLVING SIMULTANEOUS EQUATIONS


The solution of the equation system 4.10 (given again here, but without subscripts on K, u and P as 8.1)
is normally the most computationally expensive part of a finite element solution.

Ku  P (8.1)

There are many techniques available for solving these equations but standard direct methods that deal with
the solution of the whole equation system are not used in finite element codes other than for relatively
small problems. The reason for this is that finite element stiffness matrices are sparse, which means that
they contain many more zero entries than non-zero. This issue is discussed further in Section 8.3, but,
largely because of the issue of sparsity, the development of efficient equation solution methods has been
a very active research area for over half a century.

There are two main categories of solution method for linear equation systems
(i) Direct solution methods
Most direct solvers are developments of either Gaussian elimination or LU decomposition
techniques (which are themselves related)
(ii) Iterative solution methods
Many of these are based on Conjugate gradient solution techniques

8.2 DIRECT SOLUTION WITH GAUSSIAN ELIMINATION


The aim of the Gaussian elimination process is to change a system of equations into a triangular form,
which can then be solved by systematic back substitution. For example, the 5x5 equation system shown
below in equation 8.2 would be transformed into the upper triangular system shown in equation 8.3

 K11 K12 K13 K14 K15   u1   P1 


K K 22 K 23 K 24 K 25  u 2  P2 
 21
 K 31 K 32 K 33 K 34 K 35   u 3    P3  (8.2)
    
K 41 K 42 K 43 K 44 K 45  u 4  P4 
 K 51 K 52 K 53 K 54 K 55   u 5   P5 

K n11 K n12 K n13 K n14 K n15   u1   P n1 


    
 0 K n 22 K n 23 K n 24 K n 25  u 2  P n 2 
 0 0 K n 33 K n 34 K n 35   u 3    P n 3  (8.3)
  
 0 0 0 Kn 44 K n 45  u 4  P n 4 
   
 0 0 0 0 K n 55   u 5   P n 5 

This process is accomplished by working through each row (i.e. each equation) in turn and eliminating
(i.e. making zero) all entries in the column below the diagonal element. It starts by the terms in the first
column below row 1 being eliminated and then proceeds with the terms below the second row in column
two being eliminated and so on. The process is illustrated below.

115
Elimination process

Ko denotes the matrix at the start of a stage and Kn at the end. Between stages, Ko is replaced with the Kn
that has just computed. At the start of the whole process Ko = K

Stage 1. Eliminate Terms in 1st column below row 1


Equation 2 is replaced by (equation 2) - (equation 1)*Ko21/ Ko11, which makes Kn21 =0;
Equation 3 is replaced by (equation 3) – (equation 1)*Ko31/ Ko11, which makes Kn 31 = 0
Equation 4 is replaced by (equation 4) – (equation 1)* Ko41/ Ko11, which makes Kn 41 = 0
Equation 5 is replaced by (equation 5) – (equation 1)* Ko51/ Ko11, which makes Kn 51 = 0

Stage 2. Eliminate Terms in 2nd column below row 2


Equation 3 is replaced by (equation 3) – (equation 2)* Ko32/ Ko22, which makes Kn 32 = 0
Equation 4 is replaced by (equation 4) – (equation 2)* Ko42/ Ko22, which makes Kn 42 = 0
Equation 5 is replaced by (equation 5) – (equation 2)* Ko52/ Ko22, which makes Kn 52 = 0

Stage 3 Eliminate Terms in 3rd column below row 3


Equation 4 is replaced by (equation 4) – (equation 3)* Ko43/ Ko33, which makes Kn 43 = 0
Equation 5 is replaced by (equation 5) – (equation 3)* Ko53/ Ko33, which makes Kn 53 = 0

Stage 4 Eliminate Terms in 4th column below row 4


Equation 5 is replaced by (equation 5) – (equation 4)* Ko54/ Ko44, which makes Kn 54 = 0

Kn now has non-zero terms only on or above the diagonal and it is thus termed an upper triangular matrix
(often denoted U). A matrix which only has non-zero terms on or below the diagonal is termed lower
triangular (and is often denoted L).

EXERCISE 8.1.
In stage 1, the individual terms of the matrix become those shown in the equation below.
Fill-in the missing terms.

 K11 K12 K13 K14 K15   u1   P1 


  
   K 21 K K K 21     K 21 
 K 22  K12 * K 23  K13 * 21 K 24  K14 * 21 K 25  K15 * u  
K11   2   2 1 K11 
 P P
 K11 K11 K11
    
  K 31 K K K 31     K 31 
  K 32  K12 * K 33  K13 * 31 K 34  K14 * 31 K 35  K15 *  u  P  P
K11      3 1 K11 
3
  K11 K11 K11
  
  K   K 41 
K 45  K15 * 41   u 4   P4  P1
K 41 K K
  K 42  K12 * K 43  K13 * 41 K 44  K14 * 41
K11 
  K11 K11 K11 K11   
   
 
   K 51 K K K 51     P  P K 51 
 K 52  K12 * K 53  K13 * 51 K 54  K14 * 51 K 55  K15 * u5  5 1 K11 
   K11 K11 K11 K11    
 
(8.4)

116
This may be written in matrix form Kn u =Pn, noting that Kn and Pn, here, are the updated matrix and r.h.s
vector, not the final form shown in (8.3)

K n11 K n12 K n13 K n14 K n15   u1   P n1 


    
 0 K n 22 K n 23 K n 24 K n 25  u 2  P n 2 
 0 K n 32 K n 33 K n 34 K n 35   u 3    P n 3  (8.5)
  
 0 K n 42 Kn 43 Kn 44 K n 45  u 4  P n 4 
   
 0 K n 52 K n 53 K n 54 K n 55   u 5   P n 5 

For stage 2, noting that Ko is equal to Kn just calculated from stage 1 above,

K o11 K o12 K o13 K o14 K o15   u1   P o1 


     
 0 K o 22 K o 23 K o 24 K o 25    P o 
  u2  
 o  o K o32 o   2
 0 o o K 32  o o K 32 K o34  K o 24 K o35  K o 25
K 32   
K 32  K 22 o  K 33  K 23 o   o
K 32
 K o 22   u 3   P 3  o * P 2 
o o
 K 22  K 22 K o 22
     K 22 
  o  o K o 42 K o 42     
o o K 42  o o K 42 K o 44  K o 24 o o o
 0 K 42  K 22 o  K 43  K 23 o K 45  K 25  u 4  P o 4  K 42 * P o 2 
  K 22  K 22 K o 22 o
K 22     
K o 22
  o  0 o    
 0 o o K 52  o o K 52 K o54  K o 24
K '52
K o55  K o 25
K 52  u 5 o
   P o5  K 52 * P o 2 
K 52  K 22 o  K 53  K 23 0

  K 22  K 22 K '22 K o 22     K o 22


(8.6)
Terms = 0
This process is repeated until Kn has all zeros below the diagonal, as illustrated in equation (8.3).

Back substitution
Once the equations are in an upper triangular form, they may be solved by working up from the bottom
equation to the top, because each equation then only introduces one new unknown, which may be solved.
The steps of the back substitution process are illustrated below

K n11 K n12 K n13 K n14 K n15   u1   P n1 


    
 0 K n 22 K n 23 K n 24 K n 25  u 2  P n 2 
 0 0 K n 33 K n 34 K n 35   u 3    P n 3  (8.7)
  
 0 0 0 Kn 44 K n 45  u 4  P n 4 
   
 0 0 0 0 K n 55   u 5   P n 5 

117
EXERCISE 8.2.
Write out the calculations required to compute u5, then u4 then u3 etc.

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

______________________________________________________________________________(8.8)

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

Pseudo code for Gaussian elimination for n equations

EXERCISE 8.3.
Complete the code for the Back substitution phase

Elimination Elimination
for i=1:n-1
for ir=i+1:n Loop the columns to be eliminated (i.e. stages)
K ir ,i
fac  Loop rows from i+1 to n
K i,i
Loop over columns of current row (i to n)
for ic=i:n
Kir ,ic  Kir ,ic  Ki,ic fac Calculate terms on current row
end
Pir  Pir  Pi fac Calculate modified r.h.s. terms
end
end
end

Back substitution

Pn Back substitution
un  Loop backwards through equations from n to 1
K n,n
for i=n-1: (step-1) to 1
Compute the first contribution to u from the diagonal
term and then complete the rest of the terms for the
__________________________ current row
__________________________
__________________________
__________________________
__________________________
__________________________
__________________________
end

118
8.3 SPARSITY
A key issue with the solution of finite element equations is sparsity. The stiffness matrix that arises from
assembling the element stiffness matrices contains many zero entries, and therefore to solve for the full
matrix is wasteful and unnecessary.

EXERCISE 8.4.
For the 9 element problem below, put a * in the positions of the partial global stiffness matrix that have
non-zero entries.

Elem Nodes
1 1 3 4 2
2 3 5 6 4
3 5 7 8 6
4 7 9 10 8
5 9 11 12 10
6 11 13 14 12
7 13 15 16 14
8 15 17 18 16
9 17 19 20 18

1 2 3 4 5 6 7 8 ……
x y x y x y x y x y x y x y x y
Row 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ….
3 x 5 ….
y 6 …..

8.3.1 Sparsity and its consequences


Finite element stiffness matrices from large meshes are not slightly sparse but grossly sparse. Consider a
3 dimensional mesh of 20x20x20 8 noded hexagonal elements; the mesh has 9261 nodes and 27783
degrees of freedom. Thus, the order of the full K is 27783x27783, which contains 771*106 entries.
However, an internal node has connections to 26 other nodes, thus the number of non-zero entries per row
is 27*3=81, noting there are 3 degrees of freedom per node. Hence, there are approximately
27783x81=2.25*106 non-zero entries and 99.7% of the matrix entries are zero.

To solve for the full matrix in large problems is incredibly wasteful in computer time and to do so would
be to make many real problems impossible to solve. Thus a huge research effort over many years has been
made to find efficient solution methods for highly sparse equations. It is worth noting that the same
problem arises in solutions with other numerical techniques, such as finite volume, finite difference and
boundary element methods.

119
8.3.2 Solvers which account for sparsity

8.3.2.1 Banded solvers


If it can be guaranteed that the coefficient matrix (here K) contains only non-zero entries close to the
diagonal, a simple modification to a standard Gauss solver can be made which considers only those terms
within the band, as illustrated below (Ref Numerical Recipes and Hinton and Owen)

. . . . . .
. . . . . .
 All non-zero entries in a band
. . . . . . close to the diagonal
 
. . . . . .
. . . . . .
 
. . . . . .

8.3.2.2 Skyline solvers


A good general direct solver for medium size problems is the ‘skyline’ solver, which is based on LU
decomposition (Ref Bathe). In this method it is only necessary to deal with non-zeros within the band
illustrated. This means that only entries bounded by the upper and lower non-zero entries in each column
need be considered and stored.

. . . . . .
. . . . . .

. . . . . .
 
. . . . . . Only non-zero’s within the ‘skyline’ need
. . . . . . be considered
 
. . . . . .

8.3.2.3 Frontal solver


The development of the Frontal solver (Ref Irons and Ahmed) was a major step in the development of
finite element technology. The key idea in the Frontal solution method is that equations are assembled and
eliminated at the same time, with any row being eliminated as soon as it is completely assembled. At any
time the equations stored are those that are a part of the upper triangular component of the matrix that
have not yet been eliminated. These equations are termed the Front, and the Front width is the maximum
size of the array that stores these variables for the problem under consideration. The method is moderately
complex, but full listings of efficient Frontal solvers are given in a number of texts e.g. Irons and Ahmed
& Owen and Hinton.

8.3.2.4 Multi-Frontal solvers


Solvers that assemble and partially eliminate equations from sections of the matrix in such a way that
storage is minimised are termed Multifrontal. These are complex and are really the realm of those who
research in the field. Most large scale finite element codes now contain a multi-frontal solver. An excellent
source of references for the state-of-the-art in this field may be found on the web site of the Numerical
Methods Group at Oxford http://www.numerical.rl.ac.uk/
.

120
8.3.2.5. Conjugate gradient solvers with compressed row storage.
In general, iterative solvers are not as efficient as good direct solvers unless problems become large. A
huge advantage of conjugate gradient type solvers, however, is that they only need to store and work on
the non-zero entries of the matrix. This can result in major storage savings and hence they can become
very competitive for large problems. A method of storage compatible with CG solvers is compressed row
storage, in which the non-zero entries of matrix are stored in a single vector and the associated columns
and rows in the full stiffness matrix recorded in pointer arrays. This type of algorithm is highly suitable
for implementation on parallel computers. (See Appendix B. Also Ref Templates, by Barrett et al).

8.3.2.6 Sparse solutions in MATLAB


MATLAB contains some very efficient solvers for sparse systems, including a Multifront solver
developed at Yale. The input to Matlab’s sparse solver uses a compressed storage scheme in which only
non-zero entries are stored. The syntax of the command is as follows;

S = sparse(i,j,v) generates a sparse matrix S from the triplets i, j, and v such that S(i(k),j(k))
= v(k). The max(i)-by-max(j) output matrix has space allotted for length(v) nonzero
elements. sparse adds together elements in v that have duplicate subscripts in i and j.
If the inputs i, j, and v are vectors or matrices, they must have the same number of elements.
Alternatively, the argument v and/or one of the arguments i or j can be scalars.

Using the variable names in the present course and applying this to the global stiffness matrix results in
Kg=sparse(ivc,jvc,Kgvec,ntv,ntv);

in which ivc and jvc give the row and column numbers of each non-zero entry in Kgvec

This code is implemented in a Matlab function KgSparse , which is available on Learning Central. To
use this function, simply replace the function Kgmatx with KgSparse, remembering to change the call in
FEcomp.

Example
The cantilever problem in Lecture 7 will be used here as an example. Three uniform meshes of
rectangular elements are employed to illustrate the performance of the sparse function in solving the
equations. Table 1 shows the average times to solve the equations using a full and a sparse stiffness
matrix respectively:

Average times for solving equations


Mesh (nel/ntv) Full stiffness matrix Sparse stiffness matrix
480/1098 0.065 s 0.008 s
3000/6342 6.899 s 0.059 s
12000/24682 Out of memory 0.269 s

(See Appendix C for a fuller explanation)

121
8.4 CONDITIONING
A set of equations, such as those of 8.1, is ill-conditioned if a small change in K, and/or P, results in a
large change in solution u. Ill conditioned equations arise in solid mechanics problems when, for example,
different elements have vastly different stiffnesses, or when boundary conditions do not strongly prevent
rigid body motions.

All numerical calculations are carried out to a certain level of accuracy. Most finite element programs use
double precision arithmetic, which gives typically 16 significant figures or 16 digit precision. When
equations are solved by, for example Gaussian elimination or a derived method, equations are scaled and
subtracted from other equations. If terms have very different magnitudes, the process can break down
because important significant figures are lost.

Working with 10 digit precision, consider the following two calculations

(10 10  1)  1  0
(8.9)
10 10  (1  1)  10 10

It may be seen that in the first case the small number is lost. If such a small number was significant, as
maybe the case in an ill-conditioned system, the results could be meaningless.

The main lesson from this, in this course, is that having very different sizes of terms in the stiffness matrix
can lead to problems. Also, MATLAB (as do most programming languages) allow variables to be stored
to different accuracies, and it is important to ensure sufficient accuracy is being used.

122
REFERENCES
 ‘Numerical Recipes’ by W Press, W Teukolsky, W Vetterling and B Flannery (2002)
 ‘An introduction to finite element computations’ by E Hinton and R Owen(1979) (An old but
excellent text on basic F.E. theory)
 ‘Finite element programming’ by R Owen and E Hinton
 ‘Finite element procedures in Engineering Analysis’, by K J Bathe
 ‘Techniques of finite elements’ by Irons and Ahmed (1983) (A real insightful and amusing text by
Bruce Irons, who contributed so much to the methods of modern F.E. technology)
 ‘Templates for the solution of linear equations’ by Barrett et al (Available at
http://netlib2.cs.utk.edu/linalg/html_templates/report.html)
 A comprehensive set of up to date reports on solvers are available from the numerical group at
Oxford from http://www.numerical.rl.ac.uk, 2017

OPTIONAL MATLAB EXERCISE


Develop a MATLAB function that solves equations using Gaussian elimination. Check the m-file and
then substitute the automatic solve in the finite element program for your Gauss solution function and
check that the results are the same.

123
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

124
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

125
9 A BRIEF INTRODUCTION TO NON-LINEAR PROBLEMS.

9.1 Non-linear problems


Non-linear problems in solid mechanics are those in which the stiffness matrix depends upon the
displacements, i.e.
Pg  K g (ug )ug (9.1)

The are three main sources of non-linearity in finite element problems


1. Material non-linearity
This arises from, for example, metal yielding, concrete cracking or stretching in rubber like
materials
2. Geometric non-linearity
This occurs when there are large deformations, for example in, the analysis of rubber
components, impact problems and certain types of thin shell applications.
3. Contact
When contact conditions change, the stiffness of a system can change dramatically. Contact
analyses are most frequently employed in time dependent analyses in which the interaction of
two, or more, bodies is investigated.

In order to solve such problems non-linear solution strategies are required, which are generally based on
Newton-Raphson type solutions algorithms.

9.2 Material non-linearity


The field of material, or constitutive, modelling has been a vast area of research for many years and highly
complex models have been developed for almost all classes of material. Broadly speaking, there are three
underlying types of model namely plasticity models, damage models and hyperelastic models.

Plasticity models.
Plastic behaviour is characterised by permanent (plastic) strains and in one dimension an elastic-
perfectly plastic material would follow the path shown in Figure 9.1. The stress strain relationship
in one dimension is as given in equation (9.2);

  E   p  (9.2)

where p is the plastic (permanent) strain


fy

p 
Figure 9.1. Typical path for 1D elastic perfectly plastic material

126
These are used for metals, soils and even concrete, although they do not capture well the cracking
behaviour in a material like concrete. These models employ a yield function, which is normally
described in stress space, which bounds the elastic region. If the stress tries to cross this boundary,
plastic behaviour starts and the stress then remains on the yield surface which may expand, contract
or remain the same size depending on a hardening rule. In metal plasticity two commonly used yield
functions are the Von Mises and Tresca yield functions. These are illustrated in the diagram below
(Ref Owen and Hinton, Finite elements in plasticity). The equation for the Von Mises yield function,
in terms of principal stress components, is given below;
f (σ)  J 2  f y ( ) (9.3)

in which J2 is the 2nd deviatoric stress invariant

J2 
1
6
1  2 2  2  3 2  1  3 2 
and  is a scalar which increases as the plastic (permanent) strains increase

Figure 9.2. Von-Mises and Tresca yield surfaces (After Owen and Hinton)

Damage models
Damage models are based on the idea that materials undergo damage when a certain damage
threshold, or damage surface, is reached. In one dimension, a typical stress strain damage
relationship is as follows;
  1  DE (9.4)
D is the damage variable which has a value 0 when there is no damage and 1 when there is complete
damage. Unlike plasticity models, these do not have permanent strains, and thus unloading from a
damaged state follows a secant path, as illustrated in Figure 9.3.

127

Damage
threshold


Figure 9.3. Typical path for 1D damage model

It may be seen here that the material softens. Simulating such behaviour creates a major challenge
in the solution of the non-linear equations.

Damage models are most applicable to so-called quasi brittle materials such as concrete, mortars,
rocks and certain metal-matrix composites.

Hyper-elastic models
In hyper-elastic models the stresses depend only on the strains, and not upon any other state variables,
such as a damage parameter or plastic strain parameter. More formally, hyper-elastic materials are defined
as those for which there exists an elastic potential, which is a scalar function of strain components, whose
derivatives with respect to the strain components are the stress components. The potentials are generally
written in terms of stress invariants, which may be thought of as combinations of principal stresses.

One of the most widely used hyper-elastic models is that for rubber, known as the Mooney Rivlin model.

A hyper-elastic material follows the same path in loading and unloading, as shown in figure 9.4.

Damage
threshold


Figure 9.4. Typical path for 1D hyper-elastic model

128
9.3 Geometric non-linearity.
When the geometry of a structure changes during the course of an analysis, such that the stiffness in the
deformed configuration is significantly different from the stiffness based on the original configuration, it
is necessary to update the geometry and re-compute the stiffness. A simple example of a structure for
which the stiffness in the direction of the load is highly dependent on the deformed configuration is that
shown below.
Bar elements have zero stiffness
in load direction

 Stiffness increases rapidly with 

Figure 9.5. The effect of geometric non-linearity

In many geometrically non-linear problems small strain measures are inadequate and therefore it is
necessary to use higher order strain measures, for example Green’s strains. For a plane stress case these
are as shown below

2
1  u y 
2
u 1  u 
 xx  x   x    
x 2  x  2  x 
2 2
u y 1  u y  1  u 
 yy       x  (9.5)
y 2  y  2  y 
u u y u x u x u y u y
 xy  x     
y x x y x y

This changes the form of the B-matrix

9.4. Solution of non-linear equations


Most non-linear solution algorithms are based on the Newton-Raphson procedure. If ugi is an estimate of
the correct displacement vector ug then there will be an error or residual , such that
ψ  Pg  K g (u g )u g (9.6)
i i

Expanding (9.6)as a Taylor’s series gives

ψ
ψ new  0  ψ  u g (9.7)
u g
i
in which
ψ K g
  K T (9.8)
u g u g
i i
and KT = Tangential stiffness matrix

129
Using (9.7) and (9.8) the displacement increment is

ug  K T 1Ψ (9.9)

It is normal to divide the applied load into increments and update the displacements until convergence is
achieved, and then apply the next increment. The entire solution algorithm is given below, in which r is a
proportion factor for the load. It is noted that  takes the value of the applied load increment at the start
of an increment and thereafter it is evaluated directly from the out of balance forces rather than from (9.6).
The out of balance forces are the difference between the stress resultant nodal forces (R, see below) and
the applied loads

R    ΞT B T σ dVe (9.10)
n e el

r  1/ninc ; r0 ; Pr  0 ; u g  0
Loop number of load increments i  1 : ninc
r  r  r
Pr  Pr  r Pg
Ψ  r Pg
Enter iteration loop it  1 : nit
u g  K T 1Ψ
u g  u g  u g
Ψ  Pr  R r
If Ψ  tolerance Exit iteration loop
Close iteration loop
Trap case of no convergenc e
Close increment loop

This is illustrated for a one dimensional non-linear relationship below.

130
r Pg

2 1 =residual at start 1st iteration


r Pg 1
of current increment

2 =residual calculated at the end of 1st


iteration of the current increment

R1 = Internal forces at end of 1st


increment

ug

Figure 9.6. Illustration of non-linear solution process

131
APPENDIX B. DIFFERENT FORMS OF SOLVER. (NOT EXAMINABLE)

ITERATIVE SOLUTIONS AND INTERPRETATION AS MINIMISING THE QUADRATIC


FORM

B1 Solving equations by minimising the quadratic form


Many iterative solvers are based on the principles of optimisation and in optimisation algorithms the
aim, in general, is to find the minimum of a cost function (or functions). In the present case a scalar
function may be derived that has the same solution as equation (8.1). This is shown below;

1
f (u)  u T Ku  u T P  0
2 (B1)

Given a particular approximation ua, minimizing f(ua) moves towards the exact solution f(u)=0, thus
f
0
u a (B2)
gives the solution to (8.1) when ua=u

The fact that (B1) provides the solution to the equations is readily demonstrated. For example, for a 2x2
set of symmetric equations, for which K12=K21

u Ku  u T P  u1K11u1  2K12u1u 2  u 2 K 22u 2   u1P1  u 2 P2 


1 T 1
2 2 (B3)
noting use has been made of K12=K21

F
 K11u1  K12 u 2   P1   0
u1
F
 K12 u1  K 22 u 2   P2   0
u 2
rearrangin g and replacing the 2nd K12 with K 21 gives
 K11 K12   u1   P1 
K     
 21 K 22  u 2  P2  (B4a-b)

which is the original system of equations (8.1).

132
B2 Conjugate gradient solutions
Probably the best and most successful iterative solution algorithms are based upon Conjugate gradient
techniques. The method works by minimising a quadratic function, as described above.

If uj = jth iterate (or jth approximation) to the exact solution (u) and r is a residual (or error) vector such
that

rj  Ku j  P
(B5)

the update to u is given by

u j  u j1  ipi
(B6)

in which  and p are chosen to minimise the error function, the proof of which will not be given here.

The resulting algorithm is rather compact, as shown below;

Set an initial value for u0, e.g. =Kdiag-1P, where Kdiag contains only the diagonal entries of K
then r0=K u0 - P and p0-=r0

Conjugate gradient algorithm


r jT r j
j 
p jT Kp j
r j1  r j   jK p j

r j1T r j1
j 
r jT r j
p j1  r j   jp j
u j1  u j   jp j

The steps are repeated until the residual becomes acceptably small, i.e. the iteration loop j=1,2,3 … is
continued until a convergence criterion is satisfied.

133
B3 DIRECT SOLUTION WITH LU DECOMPOSITION
LU decomposition is another method that leads to the solution of a triangular set of equations. The basic
idea is that if a lower (L) and an upper (U) triangular matrix could be found, the product of which is the
coefficient matrix of the system (K), the solution could then be found by back and forward substitution
operations alone. It is noted that, although classified differently here, Gaussian elimination may be cast
as a set of LU operations. The operations are as follows;

For the system


Ku  P (B7)

Assume
LU  K (B8)

Then
(LU)u  P (B9)

And

L(Uu)  P
Solve for y
Ly  P
and then for u
Uu  y (B10a-c)
Both solutions can be carried out directly by forward and backward substitutions alone.

The question is how to find L and U efficiently. A classical algorithm for nonsymmetric matrices is
Crout’s algorithm, but for symmetric positive definite systems, Cholesky decomposition is a simple and
effective method (Ref Numerical recipes). The Cholesky decomposition method turns out to be very
straight forward, as follows;

Noting that if the equations are symmetric U = LT and therefore ;

 K11 K12 . . K1n   L11 0 . . 0  L11 L 21 . . L n1 


K K 22 . . K 2n  L 21 L 22 . . 0   0 L 22 . . L n 2 
 21
 K 31 K 32 . . K 3n    L 31 L 32 . . 0  0 0 . . L n3 
    
 : : : : :   : : : : :  : : : : : 
 K n1 K n2 . . K nn   L n1 L n2 . . L nn   0 0 . . L nn 

Then the coefficients Lij can be found as follows

for i=1:n
 i 1 
L ii   K ii   L ik 2 
 k 1 
for j=i+1:n
 i 1 
 K ji   L jk L ik 
 
L ji   
k 1
L ii
end

In the loop all required terms are already known by the time they are needed.

134
APPENDIX C. Code optimization with MATLAB. (NOT EXAMINABLE)
C1.1 Sparse solver
Finite element stiffness matrices are sparse and considerable memory can be saved if their sparsity is
exploited. Moreover, solving the equations becomes a lot faster and this is significant for large
problems.

The cantilever problem in Lecture 7 will be used here as an example. Three uniform meshes of
rectangular elements are employed to illustrate the performance of the sparse function in solving the
equations. Table 1 shows the average times to solve the equations using a full and a sparse stiffness
matrix respectively:

Table C1. Average times for solving equations


Mesh (nel/ntv) Full stiffness matrix Sparse stiffness matrix
480/1098 0.065 s 0.008 s
3000/6342 6.899 s 0.059 s
12000/24682 Out of memory 0.269 s

It can be observed that solving the equation is orders of magnitude faster when employing a sparse
stiffness matrix rather than a full stiffness matrix.
Note: tic and toc functions are used to measure the elapsed time (in seconds) as shown below:

tic
ug = Kgmod\rhsmod';
tsolve = toc

tsolve = 0.3927

C1.2 Efficient finite element assembly in Matlab


Solving the equations is not the only time consuming operation; stiffness matrix assembly and stress
evaluation can become expensive especially for large scale problems: the larger the stiffness matrix, the
slower the assembly operations. In Matlab, nested or embedded for loops tend to be slow (this may not
be the case for other coding languages), particularly when operating within a sparse matrix.

C1.3 Vectorised assembly


A more efficient way of coding the assembly is to avoid using nested for loops and use instead
vectorised computation. A computation is vectorised by taking advantage of vector operations. A variety
of programming situations can be vectorised, often improving speed to 10 times faster or even better.
Vectorization is one of the most general and effective techniques for writing fast Matlab code.

C1.4 Sparse assembly


Another and even more efficient way to assemble the global stiffness matrix is to use the sparse function
as the assembly operation. Using three vector arrays I, J, X such that Kg(I(i),J(i))=X(i), the sparse matrix
K of size ntv x ntv is built as:

Kg = sparse(I,J,X,ntv,ntv).

The X values of repeated pairs in I,J are added each other in Matlab sparse function, which represents
the assembly procedure. The allocation (with Matlab zeros function) of I, J and X is done before the
finite element loop. Note that the size of these arrays is known a priori.

135
Table C2. Average assembly times
Mesh (nelem/ntotv) Nested for assembly Vectorised assembly Sparse assembly
480/1098 0.379 0.146 0.134
3000/6342 4.502 1.376 0.810
12000/24682 71.658 17.916 3.203

Note: Results presented here were obtained with an Intel® Core™ i5-2450M CPU @ 3.10 GHz, 1333
MHz, 6GB RAM, Windows 7 (64-bit) machine.

136
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

137
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

138
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

139
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

140
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
141
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

142

You might also like