0% found this document useful (0 votes)
39 views

Soal 1

1. The document contains calculations for analyzing truss structures using the truss_2d and truss_2dEA functions in MATLAB. It includes defining node coordinates, member properties, calculating stiffness matrices, applying loads, and solving for member forces. 2. The first problem involves a simple 2-member truss. The second problem is a 4-member truss. The third problem analyzes a 6-member truss. Displacements and member forces are calculated for applied loads in each case. 3. The document demonstrates the process of assembling global stiffness matrices from element matrices, applying loads, inverting the reduced stiffness matrix, and post-multiplying to determine member forces. Calculations are

Uploaded by

Aulia Az Zahra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Soal 1

1. The document contains calculations for analyzing truss structures using the truss_2d and truss_2dEA functions in MATLAB. It includes defining node coordinates, member properties, calculating stiffness matrices, applying loads, and solving for member forces. 2. The first problem involves a simple 2-member truss. The second problem is a 4-member truss. The third problem analyzes a 6-member truss. Displacements and member forces are calculated for applied loads in each case. 3. The document demonstrates the process of assembling global stiffness matrices from element matrices, applying loads, inverting the reduced stiffness matrix, and post-multiplying to determine member forces. Calculations are

Uploaded by

Aulia Az Zahra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Soal 1

nkoord=[4000 2000;0 0;4000 0]


nkoord =
4000 2000
0 0
4000 0
>> mdata = [1 1 2 1;2 2 3 1]
mdata =
1 1 2 1
2 2 3 1
[ K1, L1, T1 ] = truss_2d ( 4000, 2000, 0, 0, 1 )
K1 =
1.0e-03 *
0.1789 0.0894 -0.1789 -0.0894
0.0894 0.0447 -0.0894 -0.0447
-0.1789 -0.0894 0.1789 0.0894
-0.0894 -0.0447 0.0894 0.0447
L1 = 4.4721e+03
T1 = 0.8944 0.4472 -0.8944 -0.4472
>> [ K2, L2, T2 ] = truss_2d ( 0, 0, 4000, 0, 1 );
>> k40=[0 0 0 0]; k20=[0 0]; k60=[0 0 0 0 0 0]; k02x2=[0 0;0 0];
>> k04x2=[0 0;0 0;0 0;0 0];
>> K11=[K1 k04x2;k60;k60]
K11 =
1.0e-03 *
0.1789 0.0894 -0.1789 -0.0894 0 0
0.0894 0.0447 -0.0894 -0.0447 0 0
-0.1789 -0.0894 0.1789 0.0894 0 0
-0.0894 -0.0447 0.0894 0.0447 0 0
0 0 0 0 0 0
0 0 0 0 0 0
>> K22=[K2(1:2,1:2) k02x2 K2(1:2,3:4);k60;k60;K2(3:4,1:2) k02x2 K2(3:4,3:4)];
>> KG_S=K11+K22
KG_S =
1.0e-03 *
0.4289 0.0894 -0.1789 -0.0894 -0.2500 0
0.0894 0.0447 -0.0894 -0.0447 0 0
-0.1789 -0.0894 0.1789 0.0894 0 0
-0.0894 -0.0447 0.0894 0.0447 0 0
-0.2500 0 0 0 0.2500 0
0 0 0 0 0 0
>> Force=[0;-24;0;0;0;0]
Force =
0
-24
0
0
0
0
>> Force=[0;-24];
>> KGS_F=KG_S(1:2,1:2)

KGS_F =
1.0e-03 *
0.4289 0.0894
0.0894 0.0447
>> d=inv(KGS_F)*Force
d=
1.0e+05 *
1.9200
-9.2066
>> KG_sf=KG_S([3 4 5 6],:)
KG_sf =
1.0e-03 *
-0.1789 -0.0894 0.1789 0.0894 0 0
-0.0894 -0.0447 0.0894 0.0447 0 0
-0.2500 0 0 0 0.2500 0
0 0 0 0 0 0
>> d_all=[d;0;0;0;0]
d_all =
1.0e+05 *
1.9200
-9.2066
0
0
0
0
>> Reaksi=mtimes(KG_sf,d_all)
Reaksi =
48.0000
24.0000
-48.0000
0
Soal 2

>> nkoord=[1 0 0;2 4000 -4000;3 4000 0;4 7000 0]


nkoord =
1 0 0
2 4000 -4000
3 4000 0
4 7000 0
>> mdata=[1 1 2 70000 5000;2 2 3 70000 3800;3 2 4 70000 5000]
mdata =
1 1 2 70000 5000
2 2 3 70000 3800
3 2 4 70000 5000
>> [ K1, L1, T1 ] = truss_2dEA ( 0, 0, 4000, -4000, 70000, 5000 )
K1 =
1.0e+04 *
3.0936 -3.0936 -3.0936 3.0936
-3.0936 3.0936 3.0936 -3.0936
-3.0936 3.0936 3.0936 -3.0936
3.0936 -3.0936 -3.0936 3.0936
L1 = 5.6569e+03
T1 = -0.7071 0.7071 0.7071 -0.7071
>> [ K2, L2, T2 ] = truss_2dEA ( 4000, -4000, 4000, 0, 70000, 3800 );
>> [ K3, L3, T3 ] = truss_2dEA ( 4000, -4000, 7000, 0, 70000, 5000 );
>> K04x4=[0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0];
>> K80=[0 0 0 0 0 0 0 0];
>> KG1=[K1 K04x4;K80;K80;K80;K80]
KG1 =
1.0e+04 *
3.0936 -3.0936 -3.0936 3.0936 0 0 0 0
-3.0936 3.0936 3.0936 -3.0936 0 0 0 0
-3.0936 3.0936 3.0936 -3.0936 0 0 0 0
3.0936 -3.0936 -3.0936 3.0936 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

>> K02x2=[0 0;0 0];


>> KG2=[K2(1:2,1:2) K02x2 K2(1:2,3:4) K02x2;K80;K80;K2(3:4,1:2) K02x2 K2(3:4,3:4) K02x2;K80;K80];
>> K04x2=[0 0 0 0;0 0 0 0];
>> KG3=[K3(1:2,1:2) K04x2 K3(1:2,3:4);K80;K80;K80;K80;K3(3:4,1:2) K04x2 K3(3:4,3:4)];
>> KGS=KG1+KG2+KG3
KGS =
1.0e+05 *
0.5614 0.0266 -0.3094 0.3094 0 0 -0.2520 -0.3360
0.0266 1.4224 0.3094 -0.3094 0 -0.6650 -0.3360 -0.4480
-0.3094 0.3094 0.3094 -0.3094 0 0 0 0
0.3094 -0.3094 -0.3094 0.3094 0 0 0 0
0 0 0 0 0 0 0 0
0 -0.6650 0 0 0 0.6650 0 0
-0.2520 -0.3360 0 0 0 0 0.2520 0.3360
-0.3360 -0.4480 0 0 0 0 0.3360 0.4480
>> Force=[20000;-50000]
Force =
20000
-50000
>> KGS_F=KGS(1:2,1:2)
KGS_F =
1.0e+05 *
0.5614 0.0266
0.0266 1.4224
>> d=inv(KGS_F)*Force
d=
0.3733
-0.3585
>> KG_sf=KGS([3 4 5 6 7 8],:)
KG_sf =
1.0e+04 *
-3.0936 3.0936 3.0936 -3.0936 0 0 0 0
3.0936 -3.0936 -3.0936 3.0936 0 0 0 0
0 0 0 0 0 0 0 0
0 -6.6500 0 0 0 6.6500 0 0
-2.5200 -3.3600 0 0 0 0 2.5200 3.3600
-3.3600 -4.4800 0 0 0 0 3.3600 4.4800
>> d_all=[d;0;0;0;0;0;0]
d_all =
0.3733
-0.3585
0
0
0
0
0
0
>> Reaksi=mtimes(KG_sf,d_all)
Reaksi =
1.0e+04 *

-2.2639
2.2639
0
2.3842
0.2639
0.3519
Soal 3

nkoord=[1 0 0;2 14000 0;3 8000 6000]


nkoord =
1 0 0
2 14000 0
3 8000 6000
>> mdata=[1 2 1 1;2 3 1 1;3 3 2 1]
mdata =
1 2 1 1
2 3 1 1
3 3 2 1
[ K1, L1, T1 ] = truss_2d ( 14000, 0, 0, 0, 1 )
K1 =
1.0e-04 *
0.7143 0 -0.7143 0
0 0 0 0
-0.7143 0 0.7143 0
0 0 0 0
L1 = 14000
T1 = 1 0 -1 0
>> [ K2, L2, T2 ] = truss_2d ( 8000, 6000, 0, 0, 1 );
>> [ K3, L3, T3 ] = truss_2d ( 8000, 6000, 14000, 0, 1 );
>> K60=[0 0 0 0 0 0]; K02x4 =[0 0;0 0;0 0;0 0]; K02x2 =[0 0;0 0];
>> KG1 =[K60;K60;K02x4 K1]
KG1 =
1.0e-04 *
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0.7143 0 -0.7143 0
0 0 0 0 0 0
0 0 -0.7143 0 0.7143 0
0 0 0 0 0 0
>> KG2 =[K2 K02x4;K60;K60];
>> KG3 =[K3(1:2,1:2) K02x2 K3(1:2,3:4);K60;K60;K3(3:4,1:2) K02x2 K3(3:4,3:4)];
>> KGS=KG1+KG2+KG3
KGS =
1.0e-03 *

0.1229 -0.0109 -0.0640 -0.0480 -0.0589 0.0589


-0.0109 0.0949 -0.0480 -0.0360 0.0589 -0.0589
-0.0640 -0.0480 0.1354 0.0480 -0.0714 0
-0.0480 -0.0360 0.0480 0.0360 0 0
-0.0589 0.0589 -0.0714 0 0.1304 -0.0589
0.0589 -0.0589 0 0 -0.0589 0.0589
>> Force=[80;-120;0]
Force =
80
-120
0
>> KGS_F=KGS([1 2 5],[1 2 5])
KGS_F =
1.0e-03 *
0.1229 -0.0109 -0.0589
-0.0109 0.0949 0.0589
-0.0589 0.0589 0.1304
>> d=inv(KGS_F)*Force
d=
1.0e+06 *
1.1612
-2.0244
1.4400
>> KG_sf=KGS([3 4 5 6],:)
KG_sf =
1.0e-03 *
-0.0640 -0.0480 0.1354 0.0480 -0.0714 0
-0.0480 -0.0360 0.0480 0.0360 0 0
-0.0589 0.0589 -0.0714 0 0.1304 -0.0589
0.0589 -0.0589 0 0 -0.0589 0.0589
>> d_all = [d([1 2]);0;0;d([3]);0]
d_all =
1.0e+06 *
1.1612
-2.0244
0
0
1.4400
0
>> reaksi=mtimes(KG_sf,d_all)
reaksi =

-80.0000
17.1429
0.0000
102.8571
Soal 4

>> koord= [ 1 0 0; 2 30 0; 3 60 0]
koord =
1 0 0
2 30 0
3 60 0
>> DOF= [1 2; 1 3; 2 4; 3 5; 4 6]
DOF =
1 2
1 3
2 4
3 5
4 6
>> L1= sqrt((koord(2,3)-koord(1,3))^2+ (koord(2,2)-koord(1,2))^2)
L1 = 30
>> L2= sqrt((koord(3,3)-koord(2,3))^2+ (koord(3,2)-koord(2,2))^2);
>> P1= 18; P2= 10; a11= 20; b11= 10;
>> Qf11= (P1*b11^2)*(3*a11+b11)/(L1^3)
Qf11 = 4.6667
>> Qf21 = (P1*a11*b11^2)/(L1^2);Qf31 = (P1*a11^2)*(a11+3*b11)/(L1^3);
>> Qf41 = -(P1*b11*a11^2)/(L1^2);
>> a12= 15; b12=15;
>> Qf12= (P2*b12^2)*(3*a12+b12)/(L2^3); Qf22 = (P2*a12*b12^2)/(L2^2);
>> Qf32 = (P2*a12^2)*(a12+3*b12)/(L2^3); Qf42 = -(P2*b12*a12^2)/(L2^2);
>> EI = 1; Teta= 1;
>> s= [(4*EI*Teta/L1)+(4*EI*Teta/L2)]
s= 0.2667
>> Pf= [Qf41 + Qf22]
Pf = -42.5000
>> k1= (EI/(L1^3))*[ 12 6*L1 -12 6*L1; 6*L1 4*(L1^2) -6*L1 2*(L1^2); -12 -6*L1 12 -6*L1; 6*L1
2*(L1^2) -6*L1 4*(L1^2)]
k1 =
0.0004 0.0067 -0.0004 0.0067
0.0067 0.1333 -0.0067 0.0667
-0.0004 -0.0067 0.0004 -0.0067
0.0067 0.0667 -0.0067 0.1333
>> Ff1 = [Qf11; Qf21; Qf31; Qf41]
Ff1 =
4.6667
40.0000
13.3333
-80.0000
>> k2= (EI/(L2^3))*[ 12 6*L2 -12 6*L2; 6*L2 4*(L2^2) -6*L2 2*(L2^2); -12 -6*L2 12 -6*L2; 6*L2
2*(L2^2) -6*L2 4*(L2^2)];
>> Ff2= [Qf12; Qf22; Qf32; Qf42];
>> P= [0];
>> Sd=P-Pf
Sd = 42.5000
>> d= inv(s)*Sd
d = 159.3750
>> v1 = 1/EI*[0;0;0;d([1])]
v1 =
0
0
0
159.3750

>> F1 = k1*v1+Ff1
F1 =
5.7292
50.6250
12.2708
-58.7500
>> v2= 1/EI *[0;d([1]);0;0]
v2 =
0
159.3750
0
0
>> F2 = k2*v2+Ff2
F2 =
6.0625
58.7500
3.9375
-26.8750
>> R1 = [F1([1]);F1([2])]
R1 =
5.7292
50.6250
>> R2= [F1([3])+F2([1]);F1([4])+F2([2])]
R2 =
18.3333
0
>> R3= [F2([3]);F2([4])]
R3 =
3.9375
-26.8750

>> Check= R1([1])- P1 -P2 +R2([1])+R3([1])


Check = 3.5527e-15
Soal 5

>> koord=[ 1 0 0; 2 6 0; 3 15 0]
koord =
1 0 0
2 6 0
3 15 0
>> DOF= [1 2; 1 3; 2 4; 3 5; 4 6]
DOF =
1 2
1 3
2 4
3 5
4 6
>> L1= sqrt((koord(2,3)-koord(1,3))^2+ (koord(2,2)-koord(1,2))^2)
L1 = 6
>> L2= sqrt ((koord(3,3)-koord(2,3))^2 + (koord(3,2)-koord(2,2))^2);
>> P= 150;
>> Ltotal= L1+L2
Ltotal = 15
>> Qf1= (P*L2^2)*(3*L1+L2)/(Ltotal^3)
Qf1 = 97.2000
>> Qf2 = (P*L1*L2^2)/(Ltotal^2); Qf3= (P*L1^2)*(3*L2+L1)/(Ltotal^3);
>> Qf4 = (P*L2*L1^2)/(Ltotal^2);
>> EI1= 400*(10^6)*200
EI1 = 8.0000e+10
>> EI2= 200*(10^6)*200;
>> Teta=1;
>> s= [((4*EI1*Teta)/L1) + ((4*EI2*Teta)/L2)]
s = 7.1111e+10
>> k1= (EI1/(L1^3))*[ 12 6*L1 -12 6*L1; 6*L1 4*(L1^2) -6*L1 2*(L1^2); -12 -6*L1 12 -6*L1; 6*L1
2*(L1^2) -6*L1 4*(L1^2)]
k1 =
1.0e+10 *
0.4444 1.3333 -0.4444 1.3333
1.3333 5.3333 -1.3333 2.6667
-0.4444 -1.3333 0.4444 -1.3333
1.3333 2.6667 -1.3333 5.3333
>> k2= (EI2/(L2^3))*[ 12 6*L2 -12 6*L2; 6*L2 4*(L2^2) -6*L2 2*(L2^2); -12 -6*L2 12 -6*L2; 6*L2
2*(L2^2) -6*L2 4*(L2^2)];
>> Pf= [0]; p=0;
>> Sd=p-Pf;
>> d=inv(s)*Sd
d= 0
>> Ff1= [Qf1;Qf2;0;0]
Ff1 =
97.2000
324.0000
0
0
>> Ff2= [0;0;Qf3;Qf4]
Ff2 =
0
0
52.8000
216.0000
>> v1=(1/EI1)*[0;0;d(1);d(1)]
v1 =
0
0
0
0
>> F1 = k1*v1+Ff1
F1 =
97.2000
324.0000
0
0
>> v2=(1/EI2)*[d(1);d(1);0;0]
v2 =
0
0
0
0

>> F2 = k2*v2+Ff2;
>> R1 = [F1([1]);F1([2])]
R1 =
97.2000
324.0000
>> R2= [F1([3])+F2([1]);F1([4])+F2([2])];
>> R3= [F2([3]);F2([4])];
>> Check= R1([1])+R2([1])+R3([1])-P
Check =
0
Soal 6

>> Koord= [ 1 0 0; 2 18 0; 3 36 0; 4 54 0]
Koord =
1 0 0
2 18 0
3 36 0
4 54 0
>> DOF= [ 1 2 3 4; 1 3 5 7; 2 4 6 8; 3 5 7 9; 4 6 8 10]
DOF =
1 2 3 4
1 3 5 7
2 4 6 8
3 5 7 9
4 6 8 10
>> L1= sqrt((Koord(2,3)-Koord(1,3))^2+ (Koord(2,2)-Koord(1,2))^2)
L1 = 18
>> L2= sqrt((Koord(3,3)-Koord(2,3))^2+ (Koord(3,2)-Koord(2,2))^2);
>> L3= sqrt((Koord(4,3)-Koord(3,3))^2+ (Koord(4,2)-Koord(3,2))^2);
>> Q1= 3; Q2= 1.5;
>> Qf11 = (Q1*L1)/2
Qf11 = 27
>> Qf21 = (Q1*L1^2)/12; Qf31 = (Q1*L1)/2; Qf41 = -(Q1*L1^2)/12; Qf13 = (Q2*L3)/2; Qf23 =
(Q2*L3^2)/12;Qf33 = (Q2*L3)/2; Qf43 = -(Q2*L3^2)/12; Qf13 = (Q2*L3)/2; Qf23 = (Q2*L3^2)/12;
Qf33 = (Q2*L3)/2; Qf43 = -(Q2*L3^2)/12;
>> EI = 1; Teta=1;
>> s11= ((4*EI*Teta)/L1) + ((4*EI*Teta)/L2)
s11 = 0.4444
>> s21= ((2*EI*Teta)/L2); s12= ((2*EI*Teta)/L2); s22= ((4*EI*Teta)/L2) + ((4*EI*Teta)/L3);
>> s=[s11 s12; s21 s22]
s=
0.4444 0.1111
0.1111 0.4444
>> Pf= [Qf41; Qf23]
Pf =
-81.0000
40.5000
>> P= [0;0];
>> Sd=P-Pf
Sd =
81.0000
-40.5000
>> d= inv(s)*Sd
d=
218.7000
-145.8000
>> k1= (EI/(L1^3))*[ 12 6*L1 -12 6*L1; 6*L1 4*(L1^2) -6*L1 2*(L1^2); -12 -6*L1 12 -6*L1; 6*L1
2*(L1^2) -6*L1 4*(L1^2)]
k1 =
0.0021 0.0185 -0.0021 0.0185
0.0185 0.2222 -0.0185 0.1111
-0.0021 -0.0185 0.0021 -0.0185
0.0185 0.1111 -0.0185 0.2222
>> k2= (EI/(L2^3))*[ 12 6*L2 -12 6*L2; 6*L2 4*(L2^2) -6*L2 2*(L2^2); -12 -6*L2 12 -6*L2; 6*L2
2*(L2^2) -6*L2 4*(L2^2)]
k2 =
0.0021 0.0185 -0.0021 0.0185
0.0185 0.2222 -0.0185 0.1111
-0.0021 -0.0185 0.0021 -0.0185
0.0185 0.1111 -0.0185 0.2222
>> k3= (EI/(L3^3))*[ 12 6*L3 -12 6*L3; 6*L3 4*(L3^2) -6*L3 2*(L3^2); -12 -6*L3 12 -6*L3; 6*L3
2*(L3^2) -6*L3 4*(L3^2)]
k3 =
0.0021 0.0185 -0.0021 0.0185
0.0185 0.2222 -0.0185 0.1111
-0.0021 -0.0185 0.0021 -0.0185
0.0185 0.1111 -0.0185 0.2222
>> Ff1= [Qf11; Qf21; Qf31; Qf41]
Ff1 =
27
81
27
-81
>> Ff2= [0;0;0;0]
Ff2 =
0
0
0
0
>> Ff3= [Qf13; Qf23; Qf33; Qf43]
Ff3 =
13.5000
40.5000
13.5000
-40.5000
>> v1=(1/EI)*[0;0;0;d([1])]
v1 =
0
0
0
218.7000
>> F1 = k1*v1+Ff1
F1 =
31.0500
105.3000
22.9500
-32.4000
>> v2= 1/EI *[0;d([1]);0;d([2])]
v2 =
0
218.7000
0
-145.8000
>> F2 = k2*v2+Ff2
F2 =
1.3500
32.4000
-1.3500
-8.1000
>> v3= 1/EI *[0;d([2]);0;0]
v3 =
0
-145.8000
0
0
>> F3 = k3*v3+Ff3
F3 =
10.8000
8.1000
16.2000
-56.7000
>> F3 = k3*v3+Ff3
F3=
10.8000
8.1000
16.2000
-56.7000
>> R1 = [F1([1]);F1([2])]
R1 =
31.0500
105.3000
>> R2= [F1([3])+F2([1]);F1([4])+F2([2])]
R2 =
24.3000
0.0000
>> R3= [F2([3])+F3([1]);F2([4])+F3([2])]
R3 =
9.4500
0.0000
>> R4= [F3([3]);F3([4])]
R4 =
16.2000
-56.7000
>> Check= R1([1])- Q1*(L1) -Q2*(L3)+R2([1])+R3([1])+R4([1])
Check =
-3.5527e-15

You might also like