%Specify structure properties
nnodes=5; %specify the number of nodes
nmem=7; %specify the number of members
%Define nodal coordinates in order starting with node one
x(1)=0; y(1)=0;
x(2)=4; y(2)=3;
x(3)=12; y(3)=3;
x(4)=16; y(4)=0;
x(5)=8; y(5)=0;
%Define member connectivity start with member one
% Start node end node
mconn(1,1)=1; mconn(1,2)=2;
mconn(2,1)=2; mconn(2,2)=3;
mconn(3,1)=3; mconn(3,2)=4;
mconn(4,1)=5; mconn(4,2)=4;
mconn(5,1)=1; mconn(5,2)=5;
mconn(6,1)=5; mconn(6,2)=2;
mconn(7,1)=5; mconn(7,2)=3;
%input properties for each member
%For now E is constant.
E=200*10^6;
%A for each member
A(1)=0.0015;
A(2)=0.0015;
A(3)=0.0015;
A(4)=0.0015;
A(5)=0.0015;
A(6)=0.0015;
A(7)=0.0015;
%Specify supports
nsupp=3; %number of degrees of freedom with supports
sup(1)=1;%for the 1 to nsupp indicate which dof are supports
sup(2)=2;
sup(3)=8;
%sup(4)=8;
%sup(5)=1;
%sup(6)=2;
%Specify forces
%zero all the forces
for i=1:nnodes*2;
F(i)=0.0; %#ok<*SAGROW>
end;
nforce=7; %number of degrees of freedom with forces given
F(1)=0; %specify force at each degree of freedom where the external force is known, F(dof)
F(2)=0;
F(3)=0;
F(4)=1;
F(5)=0;
F(6)=0;
F(7)=0;
%***INPUT ENDS HERE ***
%Calculate the truss member lengths, and angles
for i=1:nmem;
dx=x(mconn(i,2))-x(mconn(i,1));
dy=y(mconn(i,2))-y(mconn(i,1));
L(i)=sqrt(dx^2+dy^2);
c(i)=dx/L(i);
s(i)=dy/L(i);
end;
%For each element create the global stiffness matrix and put it into the
%global stiffness matrix.
%zero the global stiffness matrix
for i=1:nnodes*2;
for j=1:nnodes*2;
kg(i,j)=0.0;
end;
end;
%Create each element global stiffness matrix as transpose[T][k][T]
for m=1:nmem; %loop over each element
%zero k and T
for i=1:7;
for j=1:7;
k(i,j)=0.0;
T(i,j)=0.0;
end;
end;
%create T
T(1,1)=c(m) ; T(1,2)=-1; T(1,3)=0; T(1,4)=0; T(1,5)=0; T(1,6)=-c(m); T(1,7)=0;
T(2,1)=s(m); T(2,2)=0; T(2,3)=0;T(2,4)=0; T(2,5)=0; T(2,6)=s(m); T(2,7)=0;
T(3,1)=0; T(3,2)=1; T(3,3)=-c(m); T(3,4)=0; T(3,5)=0; T(3,6)=0; T(3,7)=c(m);
T(4,1)=0; T(4,2)=0; T(4,3)=s(m); T(4,4)=0; T(4,5)=0; T(4,6)=0; T(4,7)=s(m);
T(5,1)=0; T(5,2)=0; T(5,3)=c(m); T(5,4)=1; T(5,5)=0; T(5,6)=0; T(5,7)=0;
T(6,1)=0; T(6,2)=0; T(6,3)=0;T(6,4)=-1; T(6,5)=1; T(6,6)=c(m); T(6,7)=-c(m);
T(7,1)=0; T(7,2)=0; T(7,3)=0; T(7,4)=0; T(7,5)=0; T(7,6)=-s(m); T(7,7)=-s(m);
%create k
k(1,1)=37500; k(1,2)=0; k(1,3)=0; k(1,4)=0; k(1,5)=0; k(1,6)=0; k(1,7)=0;
k(2,1)=0; k(2,2)=60000; k(2,3)=0; k(2,4)=0; k(2,5)=0; k(2,6)=0; k(2,7)=0;
k(3,1)=0; k(3,2)=0; k(3,3)=37500; k(3,4)=0; k(3,5)=0; k(3,6)=0; k(3,7)=0;
k(4,1)=0; k(4,2)=0; k(4,3)=0; k(4,4)=60000; k(4,5)=0; k(4,6)=0; k(4,7)=0;
k(5,1)=0; k(5,2)=0; k(5,3)=0; k(5,4)=0; k(5,5)=60000; k(5,6)=0; k(5,7)=0;
k(6,1)=0; k(6,2)=0; k(6,3)=0; k(6,4)=0; k(6,5)=0; k(6,6)=37500; k(6,7)=0;
k(7,1)=0; k(7,2)=0; k(7,3)=0; k(7,4)=0; k(7,5)=0; k(7,6)=0; k(7,7)=37500;
%transform k into the element global stiffness matrix
k=T'*k*T;
%put each element k into the global stiffness matrix kg
for i=1:2;
for j=1:2;
kg(mconn(m,i)*2-1,mconn(m,j)*2-1)=kg(mconn(m,i)*2-1,mconn(m,j)*2-1)+k(i*2-1,j*2-1);
kg(mconn(m,i)*2,mconn(m,j)*2)=kg(mconn(m,i)*2,mconn(m,j)*2)+k(i*2,j*2);
kg(mconn(m,i)*2-1,mconn(m,j)*2)=kg(mconn(m,i)*2-1,mconn(m,j)*2)+k(i*2-1,j*2);
kg(mconn(m,i)*2,mconn(m,j)*2-1)=kg(mconn(m,i)*2,mconn(m,j)*2-1)+k(i*2,j*2-1);
end;
end; %now kg should be complete
end; %end loop over all the elements
%Put kg into kgs and modify kgs to solve for the unknown displacements
%we save kg so that we can calculate the reactions also.
kgs=kg;
%modify kgs based on the support conditions. Zero the entire row for each
%dof sup(i) except for entry kgs(sup(i),sup(i)) set it equal to 1. When we solve
%for the displacements we have essentially set them equal to zero since
%they are supports.
for i=1:nsupp; %loop through all the specified supports
for j=1:nnodes*2;
kgs(sup(i),j)=0.0; %zero the whole row
end;
kgs(sup(i),sup(i))=1.0; %put a 1 in position kgs(sup(i),sup(i))
end;
kgs %#ok<*NOPTS>
%solve for the global nodal displacements
display('The global nodal displacements are:')
G=inv(kgs)*F' %#ok<*MINV>
%Solve for the global external forces, here we use kg that we set aside
%above.
display('The global external forces are:')
F=kg*G
%Calculate the forces for each member
for m=1:nmem; %loop over each element
%zero k and T
for i=1:7;
for j=1:7;
k(i,j)=0.0;
T(i,j)=0.0;
end;
end;
%create T
T(1,1)=c(m) ; T(1,2)=-1; T(1,3)=0; T(1,4)=0; T(1,5)=0; T(1,6)=-c(m); T(1,7)=0;
T(2,1)=s(m); T(2,2)=0; T(2,3)=0;T(2,4)=0; T(2,5)=0; T(2,6)=s(m); T(2,7)=0;
T(3,1)=0; T(3,2)=1; T(3,3)=-c(m); T(3,4)=0; T(3,5)=0; T(3,6)=0; T(3,7)=c(m);
T(4,1)=0; T(4,2)=0; T(4,3)=s(m); T(4,4)=0; T(4,5)=0; T(4,6)=0; T(4,7)=s(m);
T(5,1)=0; T(5,2)=0; T(5,3)=c(m); T(5,4)=1; T(5,5)=0; T(5,6)=0; T(5,7)=0;
T(6,1)=0; T(6,2)=0; T(6,3)=0;T(6,4)=-1; T(6,5)=1; T(6,6)=c(m); T(6,7)=-c(m);
T(7,1)=0; T(7,2)=0; T(7,3)=0; T(7,4)=0; T(7,5)=0; T(7,6)=-s(m); T(7,7)=-s(m);
%create k
k(1,1)=37500; k(1,2)=0; k(1,3)=0; k(1,4)=0; k(1,5)=0; k(1,6)=0; k(1,7)=0;
k(2,1)=0; k(2,2)=60000; k(2,3)=0; k(2,4)=0; k(2,5)=0; k(2,6)=0; k(2,7)=0;
k(3,1)=0; k(3,2)=0; k(3,3)=37500; k(3,4)=0; k(3,5)=0; k(3,6)=0; k(3,7)=0;
k(4,1)=0; k(4,2)=0; k(4,3)=0; k(4,4)=60000; k(4,5)=0; k(4,6)=0; k(4,7)=0;
k(5,1)=0; k(5,2)=0; k(5,3)=0; k(5,4)=0; k(5,5)=60000; k(5,6)=0; k(5,7)=0;
k(6,1)=0; k(6,2)=0; k(6,3)=0; k(6,4)=0; k(6,5)=0; k(6,6)=37500; k(6,7)=0;
k(7,1)=0; k(7,2)=0; k(7,3)=0; k(7,4)=0; k(7,5)=0; k(7,6)=0; k(7,7)=37500;
%Extract the global displacements associated with element m
u(1)=G(mconn(m,1)*2-1);
u(2)=G(mconn(m,1)*2);
u(3)=G(mconn(m,2)*2-1);
u(4)=G(mconn(m,2)*2);
u(5)=G(mconn(m,2)*2-1);
u(6)=G(mconn(m,2)*2);
u(7)=G(mconn(m,2)*2-1);
%calculate the local element end forces
f=k*T*u';
%save the important end forces
fm(m)=f(3); %positive values mean truss member in tension, negative means compression
end;%end loop over each element
display('The member forces are:')
fm'
%plot the truss on a graph
plot(0,0,'w')
hold
%loop over all the elements and plot each element, one at a time
magnify=2000; %magnification factor for deflections
for m=1:nmem;
xm(1)=x(mconn(m,1));
ym(1)=y(mconn(m,1));
xm(2)=x(mconn(m,2));
ym(2)=y(mconn(m,2));
xu(1)=G(mconn(m,1)*2-1)*magnify;
yu(1)=G(mconn(m,1)*2)*magnify;
xu(2)=G(mconn(m,2)*2-1)*magnify;
yu(2)=G(mconn(m,2)*2)*magnify;
if fm(m) < 0.0;
plot(xm,ym,'k'); %undisplaced truss members in compression will be blue
else
plot(xm,ym,'b'); %undisplaced truss members in tension will be red
end;
plot(xm+xu,ym+yu,'r--'); %displaced truss members
end;
xlabel('xcoordinates')
ylabel('ycoordinates')
title('Undeflected(solid) and Magnified Deflected(dashed) Truss')
hold
Problem 2: Calculate the force in all members of the truss shown in Fig. 2 by using MATLAB code. ...
Write the MATLAB code and use the function linsolve() to solve the system of linear equations. Thank you! l Truss A truss is a structure that typically consists of 1. All straight members 2. connected together with pin joints 3. connected only at the ends of the members 4. and all external forces (loads&reactions) must be applied only at the joints. The weights of the members may be neglected. The basic building block of a truss is a triangle. Large...
Analyse the ten members truss structure shown in Figure 02 using Compatibility Method and calculate the axial force acting on member EC Take the Young's Modulus and the cross-sectional area of each member to be constant. 2(a) (15 marks 5 m 20 35 kN Figure Q2: Ten members truss b) Find the force in member BC 3 marks) Find the force in member BF 2 marks)
Problem 3: Determine the force on all the members of the truss structure and state if they are in tension or compression. Why is it important to identify the bars that are in compression? No zero fare renhers. 4 kN 3 m - - 5 m 5 kN
Problem 1 Determine the force in each member of the truss and state if the members are in tension or compression. (Please use Method of Joint) Given: P, = 500 lb P, = 1500 lb a=10 ft b=10 ft Problem 2 Problem 3 Determine the force in members CD, CF, and GF of the truss. State if these members are in tension or compression. (Please use Method of Section) 5 kN 4 kN 4 kN 3 kN 2 kN (...
for truss shown A) list zero force members b) which members can be eliminated without reducing the strength of the truss c) force in member CF C E 4m G F 30 kN 3m+3 m+3 m+3 m
Use MATLAB to determine the five unknown displacements of the following truss and determine the axial force in all members of the truss. Take A = 0.0015 m^2 and E = 200 GPa for each member. Please post the MATLAB code, as well as the final answers. 2 4 1 3 m 4 13 4 m 7 kN
Problem No. 2 (100 points) For the Baltimore bridge truss shown below answer the following questions: 1) Calculate Reaction Forces (FBD is already drawn assuming a pin support at A and a roller support at I) (10) 2) What is status of the Truss (determinate or indeterminate)? (10) 3) Obtain ALL the Zero force member (30) 4) Using method of Joints, find force in member PF and PG specify if these forces are in Tension or Compression? (25) 5) Using...
Problem # 1 Determine the force in members AD, and CE of the truss shown 4.5 m4.5 m-4.5 m 20 kN 20 kN 36 kN A 2.4 m
please short summarized answer 5minutes How many zero-force members are there in the truss shown? JB is rope. 3m 3m + Зm 3m А B с D 4m - 4 kN H G Select one: a. 3 b. 4 C. 2 d.5 How many zero-force members are there in the truss shown? M L K T N o P 2 m + A 2 m o O O o в с D E F G н 2 kN 2 kN...
a. Specify the type of compound truss shown in Figure 2. Assume all members are pin connected. The truss is pin supported at A and roller supported at F. Investigate the determinacy and stability of the truss Using the method of section, determine the force in member CD. State if the member is in b. c. tension or compression d. Using the method of joint, determine the force in members JK and JN. State if the members are in tension...