5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c.

m 1 of 7

clc
clear
close all
Phi= zeros(1,2);
Slip=zeros(1,2);
Fi=zeros(1,2);
DeltaAxial=zeros(1,2);
DeltaA=zeros(1,2);
As=3*0.085;
fc=10.43; % ksi
b=48; % in.b=36
RS=1.5;
tins=4;% %tins=3;%
Twth=3;% Twth=4;%
Length=16*12;
Spanx=15*12;
b1=Spanx/5;
b2=Spanx/5*2;
connloc=[24 72]; %[16 32 48 64 80]; [30 82];
connloc=transpose(connloc);
N=4;
fr=7.5*(fc*1000)^0.5/1000;
%Ec=57000*(fc*1000)^0.5/1000;
Ec=6191.46;
er=fr/Ec;
INC=b*Twth^3/12+b*Twth^3/12;
arm=(Twth+Twth)/2+tins;
arm=tins;
Curvature(1)=0;
Deflection(1)=0;
LoadTotal(1)=0;
Salam=0;
MarSal=0;
Sal=0;
Maryam=0;
Daniah=0;
%cur(1)=0;
%moment(1)=0;
e=0.00007;
Eo=0.0022;
x=0.000025
while abs(0.003-e)*100>0.0001
Daniah=Daniah+1;
if Daniah==18
break
end
e=e+x
if Daniah==6
e=input('e= ');
x=input('x= ');
end

ft1=xtension1*fr1*b*1/2.m 2 of 7 Fsum=8. end % Calculate the Total Forces Force=fc1-(ft1+fs1). ConForce=7.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c. ConForce=Fsum. while abs(Force-ConForce)>0. ft1=xtension1*fr*b*1/2.0001.% % Top Wythe Forces c1=Twth. fy =es1*(887+27613/(1+(112. else xtension1=er*c1/e. while abs(Force-ConForce)>0.001 %xs=input('What is the original value? ') Salam=Salam+1. end if Maryam==1 break end % Bottom Wythe Forces c2=c1. fc1=b*fc*curve*c1^2/Eo*(1-curve*c1/(3*Eo)). Force=1. % Calculate tension force in concrete er1=(Twth-c1)*e/c1-Fsum/(Ec*48*3). Force1=Force. % Update if er1<=er fr1=fr*er1/er.36)).0001. Force=1.01 c2=c2-0. . % Calculate tension force in Steel es1=e*(RS-c1)/c1+170/28500. xtension1=(Twth-c1).36)^(1/7.01 c1=c1-0.4*es1)^7. while abs(Fsum-ConForce)>0. fs1=fy*As. % Calculate compression force in the concrete curve=e/c1.%input('Fsum = '). if c2<=0 % Calculate tension force in steel es2=curve*(RS-c2)+170/28500.

end fs2=fy*As. % Update if er2<=er fr2=fr*er2/er.%Twth/2-(2/3*xtension2). Force=fs2.4*es2)^7.36)^(1/7.m 3 of 7 fy =es2*(887+27613/(1+(112.36)^(1/7. % Calculate tension force in concrete er2=(Twth-c2)*curve+Fsum/(Ec*48*3). fs2=fy*As. fy =es2*(887+27613/(1+(112. ft2=0. % location of ft1 Xt1=Twth+tins+Twth/2-(2/3*xtension1+c1). xtension2=(Twth-c2). end % Calculate tension force in steel es2=curve*(RS-c2)+170/28500. else .4*es2)^7. end % location of ft2 if c2<0 Xt2=0. fr2=fr. % location of fc2 if c2<0 XCc2=0. if fy>270 fy=270. if fy>270 fy=270. ft2=xtension2*fr2*b*1/2.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c. else xtension2=er/curve.36)). break else % Calculate tension force on Steel fc2=b*fc*curve*c2^2/Eo*(1-curve*c2/(3*Eo)). else XCc2=Twth/2-(c2-c2*((8*Eo-3*c2*curve)/(12*Eo-4*c2*curve))). ft2=xtension2*fr2*b*1/2. Force=fs2+ft2-fc2.36)). % location of fs1 Xts1=Twth/2+tins+Twth/2. end fc2=0. end end % calculate total moment % location of fc1 XCc1=Twth+tins+Twth/2-(c1-c1*((8*Eo-3*c1*curve)/(12*Eo-4*c1*curve))).

% kip. Span2=Span(31:61).4375-0.0001)/(2. if K<=Spanx/60 Momen2(nn)=1/2*PL*K.cur. % kip. Momen1(nn)=K/2*(Spanx/12-K)*w.ft else Momen2(nn)=1/2*PL*(Spanx/12-K).ft Span(nn)=K*12. end Momen=Momen1+Momen2.ft end Span(nn)=K*12. %0 to L/2 % Virtual-Work Moment for slop at the end M3=@(x)(1-x/Spanx).1:15 nn=nn+1. % kip. end M=(XCc1*fc1+XCc2*fc2-Xts1*fs1-Xt1*ft1-Xt2*ft2)/12. % kip. . %0 to L/2 M2=@(x)-x/2+Spanx/2.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c. for K=0:0. %1-31 31:61 61:91 91:121 121:151 Span1=Span(1:31). % kip. vq1=vq(1:31).ft elseif K>Spanx/60 && K<=2*Spanx/60 Momen2(nn)=1/2*PL*K-1/4*PL*(K-Spanx/60).1:15 nn=nn+1.4375)*8/Spanx^2*144.ft elseif K>2*Spanx/60 && K<=3*Spanx/60 Momen2(nn)=1/2*PL*K-1/4*PL*(K-Spanx/60)-1/4*PL*(K-2*Spanx/60).ft elseif K>3*Spanx/60 && K<=4*Spanx/60 Momen2(nn)=1/2*PL*K-1/4*PL*(K-Spanx/60)-1/4*PL*(K-2*Spanx/60)-1/4*PL*(K-3*Spanx/60).Momen). end %Moment form the four point loads PL=(M-8. for K=0:0. % nn=0. %0 to L 1-X/L cur(Daniah+1)=curve moment(Daniah+1)=M % moment for self wight w=(8.25). vq = interp1(moment. % kip. % kip/ft nn=0.m 4 of 7 Xt2=Twth/2-(2/3*xtension2+c2). % Virtual-Work Moment for midspan deflection M1=@(x)x/2.

^6+p3(6)*x. p2 = polyfit(Span2.^9+p4(3)*x.^5+p5(7)*x.0.^10+p1(2)*x.^9+p5(3)*x.4*Spanx/5) +integral(fun6.^5+p3(7)*x. p5 = polyfit(Span5.3*Spanx/5. Dan4=@(x)p4(1)*x. % slip at each connector Sal=0.^3+p4(9)*x.^6+p4(6)*x.^6+p5(6)*x.^8+p1(4)*x. Dan2=@(x)p2(1)*x. Span5=Span(121:151).vq5.^8+p2(4)*x.^2+p3(10)*x+p3(11). Span3=Span(61:91). fun3 = @(x) (Dan3(x). M3=@(x)-x/Spanx. Span4=Span(91:121). Dan5=@(x)p5(1)*x.^7+p3(5)*x.vq2. 2*Spanx/5.^8+p5(4)*x.10).^4+p4 (8)*x.*M1(x)).vq4.^7+p2(5)*x. fun5 = @(x) (Dan4(x).^2+p2(10)*x+p2(11).*M1(x)).^10+p5(2)*x.2*Spanx/5)+integral(fun3. vq3=vq(61:91).10).Spanx/5.^10+p3(2)*x.^9+p1(3)*x. fun6 = @(x) (Dan5(x).^10+p4(2)*x. vq4=vq(91:121).Spanx/2)+integral(fun4.^8+p4(4)*x.*M2(x)).*Dan1(x)).^3+p1(9)*x. fun4 = @(x) (Dan3(x). y (1)= (integral(fun1.vq3.^5+p2(7)*x.*M3(x)). p3 = polyfit(Span3.^9+p2(3)*x.^7+p5(5)*x.m 5 of 7 vq2=vq(31:61). .*M2(x)).Spanx/2.^7+p1(5)*x. for K=1:numel(connloc) % Virtual-Work Moment for slop at the end Sal=Sal+1.10). p1 = polyfit(Span1. fun54 = @(x) (M3(x). % 0 to L/2 M4=@(x)(1-x/Spanx). fun2 = @(x) (Dan2(x).^8+p3(4)*x.10). location=connloc(K)-12.*M1(x)). p4 = polyfit(Span4.^3+p3(9)*x.^4+p2 (8)*x.^2+p4(10)*x+p4(11).Spanx)).4*Spanx/5.^4+p3 (8)*x.^4+p1 (8)*x.vq1. fun1 = @(x) (Dan1(x).^2+p1(10)*x+p1(11).^2+p5(10)*x+p5(11).Spanx/5)+integral(fun2.3*Spanx/5)+integral(fun5.^3+p2(9)*x. Dan1=@(x)p1(1)*x.^10+p2(2)*x.^5+p4(7)*x. % L/2 to L fun1 = @(x) (Dan1(x).*M2(x)).^5+p1(7)*x.^9+p3(3)*x.10).^6+p1(6)*x.^4+p5 (8)*x.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c. vq5=vq(121:151).^3+p5(9)*x. Dan3=@(x)p3(1)*x.^7+p4(5)*x.^6+p2(6)*x.

4) % plot(connloc.Momen) % subplot(4.2*Spanx/5)+integral(fun4.2.Spanx)). fun6 = @(x) (Dan5(x). fun3 = @(x) (Dan2(x).3*Spanx/5. fun5 = @(x) (Dan4(x).connloc(1)-12)+integral(fun2.*M4(x)).2*Spanx/5)+integral(fun3.Spanx/5) +integral(fun3. 2*Spanx/5.m 6 of 7 fun2 = @(x) (Dan1(x). end for K=1:numel(connloc) DeltaA(1)=DeltaAxial(1)+DeltaAxial(2).2*Spanx/5)+integral(fun4.*M3(x)).moment) % subplot(4. fun4 = @(x) (Dan3(x).0. Phi(1) = (integral(fun1.3*Spanx/5)+integral(fun5.0.2) % plot(cur.connloc(2)-12)+integral(fun4.4*Spanx/5)+integral(fun6. end DeltaAxial(K)=Fi(G)*((Spacing)/(b*Ec*Twth))+DeltaAxial(K).Spanx/5.Spanx/5)+integral(fun2.*M4(x)).Spanx/5.*M3(x)). DeltaA(2)=DeltaAxial(2).2.4*Spanx/5)+integral(fun6.Spanx/5.vq) % subplot(4. 4*Spanx/5)+integral(fun6. 3*Spanx/5.*M4(x)). for G=1:Sal if K==1 Spacing=48.3) plot(Span.3*Spanx/5)+integral(fun5.Spanx). DeltaAxial(K)=0.4*Spanx/5. else Spacing=24. end Slipbending(K)=Phi(K)*arm.*M4(x)). Slip(K)= Slipbending(K)-2*DeltaA(K) end %subplot(4. Slip.2.3*Spanx/5)+integral(fun5. Slipbending) sliptest=Slip SlipEndt(Daniah+1)=SlipEndb*arm-2*DeltaA(1) % update .2*Spanx/5.Spanx)).4*Spanx/5.Spanx/5)+integral(fun3.*M4(x)).4*Spanx/5.*M4(x)).2. Phi(2) = (integral(fun1.connloc.connloc(1)-12.0. fun4 = @(x) (Dan3(x). 2*Spanx/5.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c.connloc(2)-12.3*Spanx/5.connloc. fun2 = @(x) (Dan2(x). SlipEndb = integral(fun2.1) %plot(Span. DeltaA. fun3 = @(x) (Dan3(x).

26 Fi(k)=N*(9081.26 && Slip(k)<0.08 && Slip(k)<=0.14*Slip(k)).1*Slip(k) + 8773. %end % end for k=1:numel(connloc) n=1.5/12/17 6:24 PM C:\Users\Salam\Downloads\NuTi2c. end plot(Deflection. if Slip(k)< 0. Mload=M.25*15*4)*1000. Fsum=sum(Fi). elseif Slip(k)>0.4375)/(2.LoadTotal) . % Curvature(Daniah+1)=curve.m 7 of 7 %for K=1:numel(connloc) % Slip(K)=SlipEndt(Daniah+1)*(Length/2-connloc(K))/(Length/2-connloc(1)). SlipatEnd(Daniah+1)=SlipEndt(Daniah+1). end beep Deflection(Daniah+1)=y. elseif Slip(k)>=0.5). % LoadTotal(Daniah+1)=75+(Mload-8. end end Fi=(Fi)/1000.08 Fi(k)=N*(118750.34 Fi(k)=N*(-11682*Slip(k) + 14172).