Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Laporan Tugas Besar Si 3211 - Analisis Struktur SEMESTER II TAHUN 2018/2019

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

LAPORAN TUGAS BESAR

SI 3211 – ANALISIS STRUKTUR

SEMESTER II TAHUN 2018/2019

Diajukan untuk memenuhi syarat kelulusan


Mata Kuliah SI 3211 – Analisis Str

Dosen
Erwin Lim ST, MT, Ph.D

Disusun oleh:
Rana Asima Dame 15016128

PROGRAM STUDI TEKNIK SIPIL

FAKULTAS TEKNIK SIPIL DAN LINGKUNGAN

INSTITUT TEKNOLOGI BANDUNG

2019
SOAL
1.

2.
3.
ANALISIS MENGGUNAKAN MATLAB
%RANA ASIMA DAME
%15016128

clear all
clc

%INPUT Data
filename = 'Soal 3.txt';
input = csvread(filename);

%Variable Counting
temp=1;

%Reading and Storing Joint Data


NJ = input(temp,1);
for i=1:1:NJ
COORD(i,1) = input(i+temp,1);
COORD(i,2) = input(i+temp,2);
end
%Part 2
temp=NJ+2;
NCJT=2;
NS=input(temp,1);
for i=1:1:NS
MSUP(i,1)=input(temp+i,1);
MSUP(i,2)=input(temp+i,2);
MSUP(i,3)=input(temp+i,3);
end
%Part 3
temp=temp+NS+1;
NMP=input(temp,1);
for i=1:1:NMP
EM(i,1)=input(temp+i,1);
end
%Part 4
temp=temp+NMP+1;
NCP=input(temp,1);
for i=1:1:NCP
CP(i,1)=input(temp+i,1);
end
%Part 5
temp=temp+NCP+1;
NM=input(temp,1);
for i=1:1:NM
MPRP(i,1)=input(temp+i,1);
MPRP(i,2)=input(temp+i,2);
MPRP(i,3)=input(temp+i,3);
MPRP(i,4)=input(temp+i,4);
end
%Part 6
temp=temp+NM+1;
NJL=input(temp,1);
for i=1:1:NJL
JP(i,1)=input(temp+i,1);
PJ(i,1)=input(temp+i,2);
PJ(i,2)=input(temp+i,3);
end
%Part 7
NR=0;i=1;
while i<=NS
i1=2;
while i1 <= NCJT + 1
if MSUP(i,i1)==1
NR=NR+1;
end
i1=i1+1;
end
i=i+1;
end
NDOF=NCJT*NJ-NR;

%Part 8
i=1;j=0;k=NDOF;
for A=i:1:NJ
ICOUNT=0;i1=1;
for B=i1:1:NS
if MSUP(B,1)==A
ICOUNT=1;
i2=1;
for c=i2:1:NCJT
i3=(A-1)*NCJT + c;
if MSUP(B,c+1)==1
k=k+1; NSC(i3,1)=k;
else
j=j+1;
NSC(i3,1)=j;
end
end
end
end
if ICOUNT==0
i2=1;
for d=i2:1:NCJT
i3=(A-1)*NCJT+d;
j=j+1;
NSC(i3,1)=j;
end
end
end

%Part 9
S = zeros(NDOF,NDOF);
i = 1;
while i<=NDOF
j=1;
while j<=NDOF
S(i,j)=0;j=j+1;
end
i=i+1;
end
IM=1;
while IM<=NM
JB = MPRP(IM,1);JE = MPRP(IM,2);
i = MPRP(IM,3);E = EM(i);
i = MPRP(IM,4);A = CP(i);
XB = COORD(JB,1);YB = COORD(JB,2);
XE = COORD(JE,1);YE = COORD(JE,2);
BL = sqrt((XE-XB)^2+(YE-YB)^2);
CX = (XE-XB)/BL;CY = (YE-YB)/BL;
GK = MSTIFFG(E,A,BL,CX,CY,NCJT);
S = S + STORES(JB,JE,NCJT,NDOF,NSC,GK);
IM = IM+1;
end

%Part 10 Joint Load Vector


P = zeros(NDOF,1);
for i=1:1:NJL
i1=JP(i);
i2=(i1-1)*NCJT;
for j=1:1:NCJT
i2=i2+1;N=NSC(i2);
if N <= NDOF
P(N,1)=P(N,1)+PJ(i,j);
end
end
end
%Part 11 Joint Displacements
D=P;
for i=1:1:NDOF
Z1=S(i,i);
for j=1:1:NDOF
S(i,j)=S(i,j)/Z1;
end
D(i)=D(i)/Z1;
for k=1:1:NDOF
if k~=i
Z=S(k,i);
for M=i:1:NDOF
S(k,M)=S(k,M)-S(i,M)*Z;
end
D(k,1)=D(k,1)-D(i,1)*Z;
end
end
end

%Part 12 REACTION FORCES


BK = zeros(2*NCJT,2*NCJT);
T = zeros(2*NCJT,2*NCJT);
V = zeros(2*NCJT,1);
U = zeros(2*NCJT,1);
Q = zeros(2*NCJT,1);
F = zeros(2*NCJT,1);
R = zeros(NR,1);
for IM=1:1:NM
JB=MPRP(IM,1); JE=MPRP(IM,2);
i = MPRP(IM,3); E = EM(i);
i = MPRP(IM,4); A = CP(i);
XB = COORD(JB,1); TB = COORD(JB,2);
XE = COORD(JE,1); YE = COORD(JE,2);
BL = sqrt((XE-XB)^2+(YE-YB)^2);
CX = (XE-XB)/BL; CY = (YE-YB)/BL;

V = MDISPG(JB,JE,NCJT,NDOF,NSC,D);
T = MTRANS(CX,CY,NCJT);
U = MDISPL(NCJT,V,T);
BK = MSTIFFL(E,A,BL,NCJT);
Q = MFORCEL(NCJT,BK,U);
F = MFORCEG(NCJT,T,Q);
R = R + STORER(JB,JE,NCJT,NDOF,NSC,F,NR);
end

%OUTPUT JOINT DISPLACEMENT


JOINT_NO = zeros (NJ,1);
XTRANS = zeros (NJ,1);
YTRANS = zeros (NJ,1);
for i=1:1:NJ
JOINT_NO (i)=i;
end
for i=1:1:NCJT*NJ
A=(i+1)/2;
B=i/2;
if NSC(i)<=NDOF
for j=1:1:NCJT*NJ
if NSC(i)==j
if mod(i,2)~=0
XTRANS (A,1)= D(j);
else YTRANS (B,1)= D(j);
end
end
end
else
if mod (i,2)~=0
XTRANS(A,1)=0;
else Y_TRANS (B,1)=0;
end
end
end
JOINT_DISPLACEMENT = table(JOINT_NO,XTRANS,YTRANS)

%INPUT MEMBER AXIAL FORCE


MAF = zeros(NM,1);
R = zeros (NR,1);
for IM=1:1:NM
JB = MPRP(IM,1); JE = MPRP(IM,2);
i = MPRP(IM,3); E = EM(i);
i = MPRP(IM,4); A = CP(i);
XB = COORD(JB,1); YB = COORD(JB,2);
XE = COORD(JE,1); YE = COORD(JE,2);
BL = sqrt((XE-XB)^2+(YE-YB)^2);
CX = (XE-XB)/BL; CY = (YE-YB)/BL;

%CALL Subprogram
V = MDISPG(JB,JE,NCJT,NDOF,NSC,D);
T = MTRANS(CX,CY,NCJT);
U = MDISPL(NCJT,V,T);
BK = MSTIFFL(E,A,BL,NCJT);
Q = MFORCEL(NCJT,BK,U);
F = MFORCEG(NCJT,T,Q);
R = R + STORER(JB,JE,NCJT,NDOF,NSC,F,NR);
MAF(IM) = Q(3);
end

%OUTPUT MEMBER AXIAL FORCE


MEMBER = zeros(NM,1);
for i=1:1:NM
MEMBER (i) = i;
if MAF(i,1)<0
arah(i,1)= "C";
else arah(i,1) = "T";
end
end
display_axial = table(MEMBER,MAF,arah)

%OUTPUT SUPPORT REACTION


JOINT_NO = zeros (NS,1);
X_FORCE = zeros (NS,1);
Y_FORCE = zeros (NS,1);
for i=1:1:NS
JOINT_NO(i,1) = MSUP(i,1);
end
for i=1:1:NS
j=i*2;
if MSUP (i,2)==1
X_FORCE(i,1)=R(j-1);
else X_FORCE(i,1)=0;
end
if MSUP(i,3)==1
Y_FORCE(i,1)=R(j);
else Y_FORCE (i,1)=0;
end
end
SUPPORT_REACTIONS = table(JOINT_NO,X_FORCE,Y_FORCE)

%Subprogram MSTIFFG Global Stiffness


function GK = MSTIFFG(E,A,BL,CX,CY,NCJT)
GK=zeros(2*NCJT,2*NCJT);

Z=E*A/BL; Z1=Z*(CX)^2;
Z2=Z*(CY)^2; Z3=Z*CX*CY;
GK(1,1)=Z1; GK(2,1)=Z3; GK(3,1)=-Z1; GK(4,1)=-Z3;
GK(1,2)=Z3; GK(2,2)=Z2; GK(3,2)=-Z3; GK(4,2)=-Z2;
GK(1,3)=-Z1;GK(2,3)=-Z3; GK(3,3)=Z1; GK(4,3)=Z3;
GK(1,4)=-Z3;GK(2,4)=-Z2; GK(3,4)=Z3; GK(4,4)=Z2;
end

%Subprogram STORES
function A=STORES(JB,JE,NCJT,NDOF,NSC,GK)
A=zeros(NDOF,NDOF);
i=1;
while i<=2*NCJT
if i<=NCJT
i1=(JB-1)*NCJT+i;
else i1=(JE-1)*NCJT+(i-NCJT);
end
N1=NSC(i1);
if N1<=NDOF
j=1;
while j<=2*NCJT
if j<=NCJT
i1=(JB-1)*NCJT+j;
else i1=(JE-1)*NCJT+j-NCJT;
end
N2=NSC(i1);
if N2<=NDOF
A(N1,N2)=A(N1,N2)+GK(i,j);
end
j=j+1;
end
end
i=i+1;
end
end

%Subprogram MDISPG Global Displacement


function V = MDISPG(JB,JE,NCJT,NDOF,NSC,D)
V = zeros(2*NCJT);
j=(JB-1)*NCJT;
for i=1:1:2*NCJT
j=j+1;
N = NSC(j);
if N<=NDOF
V(i) = D(N);
end
end
j=(JE-1)*NCJT;
for i=NCJT+1:1:2*NCJT
j=j+1;
N=NSC(j);
if N<=NDOF
V(i)=D(N);
end
end
end

%Subprogram MTRANS Transformation Matrix


function T = MTRANS(CX,CY,NCJT)
T = zeros(2*NCJT,2*NCJT);
for i=1:1:2*NCJT
for j=1:1:2*NCJT
T(i,j) = 0;
end
end
T(1,1) = CX; T(2,1) = -CY;
T(1,2) = CY; T(2,2) = CX;
T(3,3) = CX; T(4,3) = -CY;
T(3,4) = CY; T(4,4) = CX;
end

%Subprogram MDISPL Local Displacement


function U = MDISPL(NCJT,V,T)
U = zeros (2*NCJT);
for i=1:1:2*NCJT
for j=1:1:2*NCJT
U(i)=U(i)+T(i,j)*V(j);
end
end
end

%Subprogram MSTIFFL Local Stiffness


function BK = MSTIFFL(E,A,BL,NCJT)
BK = zeros (2*NCJT,2*NCJT);
Z=E*A/BL;
BK(1,1)= Z; BK(3,1)= -Z;
BK(1,3)= -Z; BK(3,3)= Z;
end

%Subprogram MFORCEL Local Member End Forces


function Q = MFORCEL(NCJT,BK,U)
Q = zeros (2*NCJT);
for i=1:1:2*NCJT
for j=1:1:2*NCJT
Q(i)=Q(i)+BK(i,j)*U(j);
end
end
end

%Subprogram MFORCEG Global Member End Force


function F = MFORCEG(NCJT,T,Q)
F = zeros(2*NCJT);
for i=1:1:2*NCJT
for j=1:1:2*NCJT
F(i)=F(i)+T(j,i)*Q(j);
end
end
end

%Subprogram STORER
function R = STORER(JB,JE,NCJT,NDOF,NSC,F,NR)
R = zeros(NR,1);
for i=1:1:2*NCJT
if i<=NCJT
i1=(JB-1)*NCJT+i;
else i1=(JE-1)*NCJT+(i-NCJT);
end
N=NSC(i1);
if N>NDOF
R(N-NDOF,1) = R(N-NDOF,1)+F(i,1);
end
end
end
Hasil Perhitungan dengan Software MATLAB dan SAP2000
1. Joint displacement

 Reaction Forces

 Gaya Axial Member


Gambar 1 Hasil Analisis dengan SAP2000

2. Joint displacement
 Reaction Forces

 Gaya Aksial Member Gambar 2 Hasil Analisis SAP2000


3. Joint displacement

 Member Axial Forces


 Reaction Force

Gambar 3 Hasil Analisis SAP2000

You might also like