assemble the global structural stiffness matrix

4 次查看(过去 30 天)
I am trying to assemble the global stifness matrix in matlab I have 21 members with a 4x4 matrix
I have attached an image of the problem below it is hinges at node 1 and on ball joint at other end
I believe the output i need to be ks=24X24
%--------------------------------------------------------------------------
l1=4.5;
l2=6.36396;
a1=45;
a2=90;
a3=0;
%--------------------------------------------------------------------------
% MEMBERS
% 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
length=[l2,l1,l1,l1,l2,l1,l1,l1,l2,l1,l1,l1,12,l1,12,l1,l2,l1,l2,l2,l1];
thetha=[a1,a3,a2,a3,a1,a3,a2,a3,a1,a3,a2,a3,a1,a3,a2,a3,a1,a3,a2,a1,a3];
U=0;
for cnt=1:21
L=length(1,cnt)
angle=thetha(1,cnt)
l=sin(angle)
m=cos(angle)
E=200*10^9
A=(.120)^2
n=[ l^2 l*m -l^2 l*m
l*m m^2 -l*m -m^2
-l^2 -l*m l^2 l*m
-l*m -m^2 l*m m^2];
K{cnt}=(A*E/L).*n
end
ks=?
  2 个评论
darova
darova 2021-3-18
You need to create connectivity between nodes/elements
p = [1 2 % 1 element
1 3 % 2 element
2 3 % 3 element
...] % and so on...
Subaharan Rajenthirakumar
The global stiffness matrix will have the dimension DoFxDoF. So, the total DoF for the truss as shown would be 24, because you have 12 nodes and at each node, you would have two DoFs, so that is correct.
The problem is not as straightforward as connecting elements end to end in a straight line. I would suggest this book: ' MATLAB codes for Finite Element Analysis', which has all the MATLAB scripts you would require to deal with basic FEA problems. Truss problems rqeuire coordinates to be defined first and using those, you should be able to asseble the global stiffness matrix easily.
Otherwise, if you are looking for a problem specific MATLAB code, you have to assemble it manually, which would be cumbersome.
Manually assembling the matrix could be reduced to half the effort by considering the symmetry of the truss. Still, cumbersome!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structural Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by