1. (MATLAB software was employed to solve for the following coursework)
Computer
Modelling
Techniques
Coursework: Finite Element Analysis
Ali Javed
Dadabhoy
ID: 2115757
eayajda@nottingham.ac.uk
2. Table of Contents
I. Cases 1 & 2............................................................................................................. 2
Data, Results and Plots
4. COMPUTER MODELLING TECHNIQUES - MARCH 2014 3
Note: Same colors used to denote same values that have been switched due to a difference in the number sequence.
Questions on the Coursework
Answer 1:
Case 1 Case 2 Case 1 Case 2 Case 1 Case2
114 162 0.0015905 0.001591 8.95E+06 8.95E+06
0.0094866 0.009487 8.95E+06 8.95E+06
-0.00161 0.001501 1.56E+07 1.56E+07
0.0095761 0.006153 -1.27E+07 -1.27E+07
0.001501 0.0012 -1.10E+07 -1.10E+07
0.0061532 0.003165 -9.37E+05 -9.37E+05
-0.001499 0.0007 3.01E+07 3.01E+07
0.0061438 0.000983 1.40E+07 1.40E+07
0.0011999 8E-47 -1.43E+07 -1.43E+07
0.0031652 1E-47 -2.99E+07 -2.99E+07
-0.0012 -0.00161 98111 9.81E+04
0.0031662 0.009576 5.00E+07 5.00E+07
0.0007 -0.0015 1.42E+07 1.42E+07
0.0009829 0.006144 -1.41E+07 -1.41E+07
-0.0007 -0.0012 -5.00E+07 -5.00E+07
0.0009828 0.003166 -10160 -10160
8E-47 -0.0007 7.00E+07 7.00E+07
9.999E-48 0.000983 1.41E+07 1.41E+07
-8E-47 -8E-47 -1.41E+07 -1.41E+07
1E-47 1E-47 -7.00E+07 -7.00E+07
f (nodal displacements stresskv
5. COMPUTER MODELLING TECHNIQUES - MARCH 2014 4
Answer 2:
In terms of the affect to the matrix by assigning the node numbers in a different manner, the degrees of freedoms are
re-arranged in the unknown sector. This will, in no way change the actual displacement of the physical nodes, only
the structural stiffness matrix will become re-arranged in response to the new arrangement of the sequence of the
degrees of freedom.
The resultant half bandwidth would change in some places, and a different size of the 1-D structural stiffness matrix
would be obtained As in our case, kv has changed due to the numbering difference showing that. One important
thing to consider though is the effect of this on the memory space and the CPU consumption. In short, computing
efficiency would also change. The rule here would be:
‘A larger 1-D matrix would be less efficient as it would use more memory and more CPU time.’
The structure does not change due to numbering the elements in a different order. Nor do the mechanical properties
change for any part of the structure. Thus, the displacements and stresses remain the same for the nodes and
elements at the same physical locations. It is as though, inflating the back or the front wheel of a cycle first before a
journey. The cycle will reach the same location intended regardless of the order of inflation of the wheels.
The different numbering though, does affect the sequence of assembly of elements into the structural stiffness matrix.
But, however, the final value of the structural stiffness matrix is the same and thus, the same results are obtained.
Therefore, the implications of different numbering are none on the results.
Answer 3:
The formula to calculate the half band widths of degrees of freedom, in the file ‘skyline.m’ for the id array is the
following:
id(j) = id(j-1) + 2*(n-m)+i
The part of the equation in bold defines the half band width at the nth node for the jth degree of freedom in relation to
the ith (i= 1, 2) degree of freedom, which are in this case two. And m is the node number of the node connected to n
by an element and has a lowest number among all other connected nodes by other elements.
Applying this formula for finding u5, v5 &u6, v6:
HBW(jth dof) = 2*(n-m)+i
2*(5-3)+1= 5 = u5
2*(5-3)+2= 6 = v5
2*(6-3)+1= 7 = u6
6. COMPUTER MODELLING TECHNIQUES - MARCH 2014 5
2*(6-3)+2= 8 = v6
What the skyline function does is, if n=5, then it will take m=5 and look for any directly connected nodes (by an
element). If none is found then m remains 5, as the code is only programmed to take values less than initial, for any
other values will be larger and hence located in the upper triangle of the 2-D structural stiffness matrix, and in turn not
be relevant to the half band width.
The code continues through the elements to capture those related directly to node 5 in its second loop. These
acquired nodes are then entered in a 3rd loop going through every node in this element. Any smaller node found
compared than its saved value, the value is changed to the smaller one. It is repeated for ie=1:ne (second loop) and
for i=1:2 (third loop).
For u5, the value found would be 3.
This is the same manner in which we have found out these values manually with the formula evaluating the id array.
Similarly, for all other nodes the path will be the same.
function [id]=skyline(ne,me,nn)
id(1)=1;
for n=1:nn %For all nodes
m=n;
for ie=1:ne %For all elements
for i=1:2 %For nodes in element
if me(ie,i)==n %Node no. of i-th node
for j=1:2 %in ie-th element
if me(ie,j)<m
m=me(ie,j); %Smallest node number
end %connected to n-th
end %node in the structure
end %through an element
end
end
for i=1:2
j=2*(n-1)+i;
if j>1
id(j)=id(j-1)+2*(n-m)+i;
end %Location of diagonal elements
end %of the stiffness matrix in 1D
end %stored array
Since, u3 of case 2, is the same physically as u5 of case 1, the final answer would be the same for both in term of
nodal displacement but he half band width is different. This is due to coming in contact with differently numbered
nodes and the structural matrix being different this time. Thus, the values obtained by skyline would be different for
the nodes at the same places but given a different number between these two cases.
Answer 4:
Element 11 is composed of nodes 5 & 6. In matlab, the file ‘assemb.m’ will use loops to come to the locations of the [K11] matrix
in the 1-d form. The first loop is directed till ie=11 starting from 1 and then the second loop goes on to inspect both nodes of
element 11. The formula, k=me(ie,n) is used. Thus, further successive loops are used to locate the position using the 2-D
stiffness matrix. The isjth and isith rows and columns point ot the location in the 1-D stiffness matrix where the K values are to be
placed. Since, the lower triangle of the matrix is saved, the isi & isj always are within the half band width and the column number
for isj is equal or lower to the row number. The stife(i,j) is added with the stif(i,j) in the end for the process to be completed.
Another formula from the code:
isij=id(isi)-(isi-isj) to locate isi row and isj column.
Manually, we use the matrix locations when we are multiplying to locate the way the elements stiffness matrix will sit into the
whole structural matrix. This is illustrated by the pictures below:
7. COMPUTER MODELLING TECHNIQUES - MARCH 2014 6
Final positions of the element 11 stiffness matrix (columns have been marked for easy reading):
Answer 5:
function [stif]=constr(nc,nnc,ic,kv,stif,ndf,id)
for n=1:nc
i=2*(nnc(n)-1)+ic(n);
ii=id(i);
stif(ii)=1e50;
end
The code used for constraint has been shown above, from the file ‘constr.m’. What it does is keep the constraint node number in
nnc array so that using a minimal amount of displacement; the degrees of freedom can be constrained. The degree of freedom of
the nth constraint then is given by i=2*(nnc(n)-1)+ic(n);. It then searches for the ith diagonal component in the 1-d
stored structural stiffness matrix and imposes a very large number 1050 in this case on it.
As the diagonal component of the stiffness matrix approaches very high values, the structure becomes very rigid at that node, i.e.
the displacement approaches zero. These negligible values are then not considered as they do not affect the accuracy of the
solution.