How can I generate the global stiffness matrix from the various stiffness member matrices using the structural matrix method?

5 vues (au cours des 30 derniers jours)
I'm trying to solve a problem involving a planar roof truss using the structural matrix method. I have gotten the various stiffness member matrices but I can't figure out how to combine these to get the global matrix. Efficiency isn't a priority I really just need to understand how to call and sum the appropriate elements of the individual matrices. If anyone has any advice or segments of code that would be helpful I would be greatly appreciative. This is what I have coded so far to get the member matrices.
lambda = [0.8944 0.8944 0.8944 0.8944 0.8944 0.8944 1 1 1 1 1 1 0 -0.8944 0 -0.7071 0 0.7071 0 0.8944 0];
mu = [0.4473 0.4473 0.4473 -0.4473 -0.4473 -0.4473 0 0 0 0 0 0 1 0.4473 1 0.7071 1 0.7071 1 0.4473 1];
i = 1;
k = cell(21,1);
for i = 1:length(lambda)
c2 = lambda(i)^2;
s2 = mu(i)^2;
cs = lambda(i)*mu(i);
k{i} = [c2, cs, -c2, -cs; cs, s2, -cs, -s2;-c2, -cs, c2, cs;-cs, -s2, cs, s2];
end
Note: I calculated mu and lambda by hand because I can't figure out how to include cross braces. As in for instance if one node can be considered the far end node for several members rather than just a single member.
  1 commentaire
James Murphy
James Murphy le 11 Avr 2016
I've since refined my code to calculate lambda and mu
nodes = [0,0;1,.5;2,1;3,1.5;4,1;5,.5;6,0;5,0;4,0;3,0;2,0;1,0]; nodes = nodes'; linksN = [1 2 3 4 5 6 8 9 10 11 12 1 12 11 11 10 10 10 9 9 8]; linksF = [2 3 4 5 6 7 7 8 9 10 11 12 2 2 3 3 4 5 5 6 6]; connect = [linksN; linksF];
k = cell(21,1);
for i = 1:length(linksF)
v = connect(:,i);
C = nodes(:,v(2))-nodes(:,v(1));
lmem = sqrt(sum((nodes(:,v(2))-nodes(:,v(1))).^2));
T = C/lmem;
c2 = (T(1)^2)/lmem;
cs = (T(1)*T(2))/lmem;
s2 = (T(2)^2)/lmem;
k{i} = [c2 cs -c2 -cs;cs s2 -cs -s2;-c2 -cs c2 cs;-cs -s2 cs s2];
end
Im still unsure as to how to combine these matrices into the global structural matrix

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Structural Analysis dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by