Đoạn chương trình matlab node that the element m start from node that the element m end to... % Define the stiffness matrix of whole structure skk % Define the stiffness of element kff
Trang 1I Phần 1: Bài tập matlab
1.Bài tập 1
a Đoạn chương trình matlab
node that the element m start from
node that the element m end to
Trang 2shear2 = zeros(nmemb,1);% The shear force at end point 1 of
elements
elements
% Prepare for calculaton
the force vector
Define the support condition
end
delx=xcord(j)-xcord(i);
dely=ycord(j)-ycord(i);
% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
Trang 3% Define the reaction force and displacement
% Define part matrix of rearrangement structure stiffess matrix
% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
n=[i-2 i-1 i j-2 j-1 j];
force=C*k22*C'*T'*displ(n);
axial1(m)=force(1);
Trang 76858
Trang 8Hình I.1: Sơ đồ kết cấu và các biểu đồ nội lực, phản lực
2.Bài tập 2
a Đoạn chương trình matlab
15383
10047 34668
12765
20436 31106
Trang 9zload= [0 0 0 0 0 0 0 0];%Moment at node around z direction (Nm)
% Information of element
% Element number 1 2 3 4 5 6 7 8
from element m start from
from element m end to
% Prepare for calculaton
the force vector
Define the support condition
end
delx=xcord(j)-xcord(i);
dely=ycord(j)-ycord(i);
Trang 10sn(m)=dely/L(m);% sin inclination of element m
% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
% Define the reaction force and displacement
% Define part matrix of rearrangement structure stiffess matrix
Trang 11% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
Trang 15Hình I.2: Sơ đồ kết cấu và các biểu đồ nội lực, phản
lực
3.Bài tập 3
a Đoạn chương trình matlab
16772
7284 42630
5405
8583 23684
Trang 16% Information of element
% Element number 1 2 3 4 5 6 7 8 9 10
node that the element m start from
node that the element m end to
% Prepare for calculaton
the force vector
Define the support condition
end
delx=xcord(j)-xcord(i);
dely=ycord(j)-ycord(i);
end
Trang 17% Define the stiffness matrix of whole structure skk
% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
% Define the reaction force and displacement
% Define part matrix of rearrangement structure stiffess matrix
Trang 18% Define the stiffness of element kff (3X3)
k22=[ea/al 0 0;0 12*ei/al^3 -6*ei/al^2;0 -6*ei/al^2 4*ei/al];
% Define the transfomation matrix T(6x6)
Trang 23II Phần 2:
1.Bài tập sap
a.Khai báo vật liệu
Trang 24b.Khai báo tiết diện
Trang 25
c.Sơ đồ kết cấu và các biểu đồ nội lực trong sap
15383.06
10046.85 34667.98
12765.20
20436.56 31106.05
Trang 267284.11 42630.35
5404.78
8582.29 23684.82