Question

650:231 M.E. Computational Analysis and Design Finally, give the member force by (see (8) in Project_2_Suppliment) PART A 15 Pts.] Consider the truss given by Fig. 2. The height of the truss is 3 ft. The cross sectional area and Youngs modulus of each bar is a-I in, and E-30 Mpsi (106 lb/in2), respectively. The symbol # for the applied load indicates the unit of lb. The truss is supported by a pin at node 6 and by a roller at node 5 1000# 5004 3. Q3 u3, P3 45° 30° v2, 02 v6,Q6 v4.Q4 500# u4, P4 Fig. 2 Following the truss example in Introduction, obtain the unknown nodal displacement components and the reaction forces for the truss in Part A. It is not necessary to solve the truss in the introduction. I. [1 pts.] Solution for the reaction forces and the member forces (1) Get the nodal equilibrium equation AF-P, (2) Get the Stiffness matrix S, (3) Get the nodal force and displacement equation ASATX (x P, (4) Apply the loading and boundary conditions to get the equation corresponding to (6), (5) Solve for the unknown nodal displacement and reaction components, (6) Give the member force F. II. [0.5 pt. | Display of the truss -Plot 1: (1) Plot the geometry of the truss following the instruction of Computer Project #1, (2) Indicate the nodes with circles and number the nodes and the members as in CP #1, (3) Show the displacement boundary condition at nodes 5 and 6 and the applied loads at other nodes as in CP #1,Use MAT:AB to code

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clear
clc

load('Data.mat')
A = 1;
E = 30*10^6;

Force_vec = [0 -1000 0 0 0 500 0 -500 0 0 0 0]';


%% Length of elements

for i = 1:length(Ele_conn_table(:,1))
node1 = Ele_conn_table(i,2);
node2 = Ele_conn_table(i,3);
x1 = Node_data(node1,2);
y1 = Node_data(node1,3);
x2 = Node_data(node2,2);
y2 = Node_data(node2,3);
Ele_conn_table(i,4) = elelength(x1,x2,y1,y2);
end

%% to find l and m
for i = 1:length(Ele_conn_table(:,1))
node1 = Ele_conn_table(i,2);
node2 = Ele_conn_table(i,3);
x1 = Node_data(node1,2);
y1 = Node_data(node1,3);
x2 = Node_data(node2,2);
y2 = Node_data(node2,3);
[Ele_conn_table(i,5),Ele_conn_table(i,6)] = findlm(x1,x2,y1,y2,Ele_conn_table(i,4));
end

%% elemental stiffness matrix
for i = 1:length(Ele_conn_table(:,1))
l = Ele_conn_table(i,5);
m = Ele_conn_table(i,6);
le = Ele_conn_table(i,4);
  
temp = [l^2 m*l -l^2 -m*l; m*l m^2 -m*l -m^2; -l^2 -m*l l^2 m*l; -m*l -m^2 m*l m^2];
  
k(i,:,:) = temp*(A*E/le);
end

%% global stiffness matrix
globalk(length(Node_data)*2,length(Node_data)*2) = 0;
for i = 1:length(Ele_conn_table(:,1))
node1 = Ele_conn_table(i,2);
node2 = Ele_conn_table(i,3);
a = node1*2 - 1;
b = node2*2 - 1;
addmat = k(i,:,:);
addmat = squeeze(addmat);
for var1 = 1:2
for var2 = 1:2
globalk(var1-2+node1*2,var2-2+node1*2) = globalk(var1-2+node1*2,var2-2+node1*2) + addmat(var1,var2);  
globalk(var1-2+node2*2,var2-2+node1*2) = globalk(var1-2+node2*2,var2-2+node1*2) + addmat(var2,var1);  
globalk(var1-2+node2*2,var2-2+node2*2) = globalk(var1-2+node2*2,var2-2+node2*2) + addmat(var1+2,var2+2);
globalk(var1-2+node1*2,var2-2+node2*2) = globalk(var1-2+node1*2,var2-2+node2*2) + addmat(var2+2,var1+2);  

end
  
end
end

%%
disp_vec = globalk^-1 * Force_vec; %Nodal Displacements
reaction = globalk*disp_vec - Force_vec; %Nodal reaction forces

%% Plot Truss
for i =1:length(Ele_conn_table(:,1))
node1 = Ele_conn_table(i,2);
node2 = Ele_conn_table(i,3);
x1 = Node_data(node1,2);
y1 = Node_data(node1,3);
x2 = Node_data(node2,2);
y2 = Node_data(node2,3);
x =[x1,x2]; y=[y1,y2];
plot(x,y,'b','linewidth',1.25)
hold on
end

scatter(Node_data(:,2),Node_data(:,3),'filled','k')
xlabel in
ylabel in

  

40 35 30 25 드20 15 10 0 20 40 60 80 100 120 140 in

Add a comment
Know the answer?
Add Answer to:
Use MAT:AB to code 650:231 M.E. Computational Analysis and Design Finally, give the member force by...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT