UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION Minor Project I Report Minjie Lu 11450458 1 Minor Project Report Primary Problem 3: Pratt Truss Bridge To start the problem, A 3-D visualisation of the Truss Bridge is needed, it was primarily did by hand sketch. After code was used in Matlab, the graphical representation of the bridge below was obtained. From Figure MP1.1, I can see due to the symmetry of the truss and the force in the steel bar across the bridge slab and the top of the bridge can be neglected, therefore this truss can be analysed as a planar truss (the truss in which all members lie in one plane). Figure MP1.1 Figure MP1.2 Unit in cm
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project I Report Minjie Lu 11450458
1
Minor Project Report
Primary Problem 3: Pratt Truss Bridge
To start the problem, A 3-D visualisation of the Truss Bridge is needed, it was primarily did by hand sketch. After code was used
in Matlab, the graphical representation of the bridge below was obtained.
From Figure MP1.1, I can see due to the symmetry of the truss and the force in the steel bar across the bridge slab and the top of
the bridge can be neglected, therefore this truss can be analysed as a planar truss (the truss in which all members lie in one plane).
Figure MP1.1
Figure MP1.2
Unit in cm
UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project I Report Minjie Lu 11450458
2
Step 1 (Methodology):
In order to determine the forces in different members of the truss, the first step is to check if the structure is statically determinate
(i.e. 2j=m+3), where j is the number of joints and m is the number of members.
m=29 and j=16 in this case (Figure MP.2). Since 2×16=29+3, therefore the truss is statically determinate.
In the analysis of trusses, in general we assume that all loads are applied at joints only, Matrix Based Approach is a good method
to use here to analysis this truss.
Step 2 (Calculation of Matrix of coefficients [A]):
The following calculation was done by hand to obtain the 32×32 Matrix of coefficients [A],(𝑭𝑎 = Internal Force in that bar a)
Cos45=Sin45=0.707
For Node 1 ∑ Horizontal Force => 𝑭1 +0.707 × 𝑭15 + 𝑯1=0
∑Vertical Force => 𝑽1 +0.707 × 𝑭15= 0
For Node 2 ∑ Horizontal Force => −𝑭1 + 𝑭2=0
∑Vertical Force => 𝑭16=0
For Node 3 ∑ Horizontal Force => −𝑭2 +0.707 × 𝑭17 + 𝑭3= 0
∑Vertical Force => 𝑭18 + 0.707× 𝑭17= 0
For Node 4 ∑ Horizontal Force => −𝑭3 − 0.707 × 𝑭19 + 𝑭4= 0
∑Vertical Force => 𝑭20 +0.707 × 𝑭19= 0
For Node 5 ∑ Horizontal Force => −𝑭4 − 0.707 × 𝑭21 + 0.707 × 𝑭23 + 𝑭5= 0
function axleforce=axle_force(w); % this function can be used to calculate the axle force will apply on the 2D truss % where w= the axle load axleforce=0.5*1.45*w;
%multiplied by 0.5 since only half of the axle load will act on one plane truss %multiplied by 1.45 due to the dynamical effect
%variable external force when the front axle of lorry is 9m pass node 1, %where d is the distance between front axle and node 1 variable_force_d9= zeros(32,1); variable_force_d9(4,1)=rear_axle_force*0.75+front_axle_force*0; variable_force_d9(6,1)=rear_axle_force*0.25+front_axle_force*0.75; variable_force_d9(8,1)=rear_axle_force*0+front_axle_force*0.25; variable_force_d9;
%variable external force when the front axle of lorry is 24m pass node 1, %where d is the distance between front axle and node 1 variable_force_d24= zeros(32,1); variable_force_d24(12,1)=rear_axle_force*1+front_axle_force*0; variable_force_d24(14,1)=rear_axle_force*0+front_axle_force*1; variable_force_d24;
UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project I Report Minjie Lu 11450458
6
Step 5 (Gaussian Elimination):
So far, in order to determine the forces in the varies number bar of the truss {𝑈} = [𝐴]−1{𝑃}
I have already obtained the 32*32 Matrix of coefficients [A],the vector of applied external forces {p}. Now I can solve the forces
vector in bars {U} by Gaussian elimination. As Matlab already has an in-built function for this form of elimination that is
{Inv(A)*B},it can be used to help check my results of Gaussian Elimination.
The following M-file was created to solve the above equation by implementing Gaussian Elimination.
function [x] = GaussianEliminate(A,b) % SolvesAx = b by Gaussian elimination
N = length(b); %work out the number of equations need
for column=1:(N-1) %swap rows so that the row we are using to eliminate %the entries in the rows below is larger than the %values to be eliminated.
%work on all the rows below the diagonal element for row =(column+1):N
%work out the value of d d = A(row,column)/A(column,column);
%do the row operation (result displayed on screen) A(row,column:end) = A(row,column:end)-d*A(column,column:end) ; b(row) = b(row)-d*b(column); end% end of loop through rows end% end of loop through columns
%back substitution
for row=N:-1:1
x(row) = b(row);
for i=(row+1):N x(row) = x(row)-A(row,i)*x(i); end
x(row) = x(row)/A(row,row); end
x = x' ;
return
Reference: ‘Numerical Methods in Chemical Engineering’, Department of Chemical Engineering and Biotechnology, University
of Cambridge. Available at http://laser.cheng.cam.ac.uk/wiki/images/d/d8/Handout2.pdf(Accessed 24 March 2014)
While the front axle of the lorry is at Node1, the internal force in bar1 is 235.12 KN (in tension),
the internal force in bar20 is -45.91 KN (in compression).
UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project I Report Minjie Lu 11450458
8
The results above can be check by implementing Matlab’s in-build ‘inv’ function,
For example to check the vector of applied external forces {P}, while the front axle of the lorry is at Node1, i.e. at d0:
The results abstained by using this in-build function confirms the results I obtained by implementing Gaussian Elimination.
The 36 interal force vector matrices {U} for 37 different positions I obtained above was stored into a separate M-file:
The reason of Why I stored this 37×32 Matrix will be explained in Step 7.
Step 7 (Visualisation):
To visualise the truss bridge, I need to write a general code to build one steel bar first, and then modify the code to obtain the rest
steel bars.
For example, the code I used to build bar1 (see Figure MP1.4 for location of bar1):
internal_force_in_bar_d0=inv(internal_force)*
(permanent_external_force+variable_force_d0)
L=4000; %Length of bar W=120; %width of bar
Max_force_in_each_bar=max(abs(matrix)); %To find maximum abslute value in each columns of the 37*32 matrix I stored Max_force=max(Max_force_in_each_bar); %To find the maximum value in the 37 values abtained above colour=abs(matrix)/Max_force;
%‘colour matrix’ which with a maximum value of 1, can be used to represent the colour
in member bars of this problem
%In this problem, it was asked that the colour of a member should be chosen to
reflect the force in it, with blue indicating a member in which the force is very low
and red a member in which the force is very high and colour smoothly transitioning
from blue to red as forces increase. To represent the corresponding colour of bar(x)
at position d(y), I can now simply use code {colour(x,y-1)} to reflect the red colour in the bar, and code{colour(x,1-(y-1))} to reflect the blue colour in the bar,
as if the force in bar(x) is at maximum value, the red colour code would equals to 1 (pure red),the blue colour code would equal to 0.
P=1 %p=1 gives the first column in the ‘colour matrix’, for bar1 at position 1 I.E.
Lorry’s front axle at D0
for n=0:8 %n range from 0 to 8 since there are 9 nodes
vertices_bottom1=[(n*L) 0 0;L+(n*L) 0 0; L+(n*L) W 0;0+(n*L) W 0]; vertices_top1=[0+(n*L) 0 W; L+(n*L) 0 W; L+(n*L) W W;0+(n*L) W W];
% To construct bar starting from node1
as the coordinate of bottom vertices is [0 0 0; L 0 0; L W 0; 0 W 0]
the coordinate of top vertices is [0 0 W; L 0 W; L W W; 0 W W]
if n==0 patch('Vertices',vertex_matrix_bar1,'Faces',face_matrix_bar,
'FaceColor',[colour(1,p) 0 (1-colour(1,p))]);end
%colour of bar1 at position1 I.E. Lorry’s front axle at D0 end
View(3)
Matrix=[the 37*32 Matrix I have obtained];
%Each column in this matrix represent the internal force vector in member bars for different positions. %I.E. Column 1 represent internal force vector{U} while front axle of lorry is at node1 (d0)
%Column 2 represent force vector{U} while front axle of lorry is 1m pass node1 (d1)
%Etc……
M-file: Matrix
UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project I Report Minjie Lu 11450458
9
From above code I can now obtain the drawing of bar1 shown in Figure MP1.5
For another example, the vertices and patch code I used for creating bar16 (see Figure MP1.4 for location of bar16):
Bar16 now can be obtained, shown in Figure MP1.6.
Similar code used for creating the diagonal bar, bar15:
code used for creating the crossing bar:
To creating the symmetrical bar1 is even more simply by changing the Z coordinate of the vertices code of bar1.
Figure MP1.5
Figure MP1.4
vertices_bottom2=[0+(n*L) 0 0;W+(n*L) 0 0; W+(n*L) W 0;0+(n*L) W 0]; vertices_top2=[0+(n*L) 0 L; W+(n*L) 0 L; W+(n*L) W L;0+(n*L) W L]; vertex_matrix_bar2=[vertices_bottom2;vertices_top2];
% n starts from 1 since no vertical bar at nodeo if n==1 patch('Vertices',vertex_matrix_bar2,'Faces',face_matrix_bar,