Lembar Editor Matlab No 2
Lembar Editor Matlab No 2
m 1 of 8
% ####################################################################### %
% NON-LINEAR SECTIONAL REINFORCED CONCRETE ANALYSIS %
% Version 1.0.4 %
% Copyright (C) 2021 Bambang Piscesa %
% Institut Teknologi Sepuluh Nopember, Surabaya, Indonesia %
% email : [email protected] %
% %
% This program is free software: you can redistribute it and/or modify %
% it under the terms of the GNU General Public License as published by %
% the Free Software Foundation version 3 of the License. %
% %
% This program is distributed in the hope that it will be useful, %
% but WITHOUT ANY WARRANTY; without even the implied warranty of %
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %
% GNU General Public License for more details. %
% %
% You should have received a copy of the GNU General Public License %
% along with this program. If not, see <http://www.gnu.org/licenses/>.%
% ####################################################################### %
%% GENERAL INFORMATION %%
% DATA INPUT IS BASED ON NW3-4.5S30 %
% PREPARE NODE
POINT = [0 0;... % NODE 1
CT 0;... % NODE 2
B-CT 0;... % NODE 3
B 0;... % NODE 4
0 CT;... % NODE 5
CT CT;... % NODE 6
B-CT CT;... % NODE 7
B CT;... % NODE 8
0 H-CT;... % NODE 9
CT H-CT;... % NODE 10
B-CT H-CT;... % NODE 11
B H-CT;... % NODE 12
0 H;... % NODE 13
CT H;... % NODE 14
B-CT H;... % NODE 15
B H]; % NODE 16
% PREPARE LINE
LINE = [1 2;... % LINE 1
2 3;... % LINE 2
3 4;... % LINE 3
1 5;... % LINE 4
2 6;... % LINE 5
3 7;... % LINE 6
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 3 of 8
4 8;... % LINE 7
5 6;... % LINE 8
6 7;... % LINE 9
7 8;... % LINE 10
5 9;... % LINE 11
6 10;... % LINE 12
7 11;... % LINE 13
8 12;... % LINE 14
9 10;... % LINE 15
10 11;... % LINE 16
11 12;... % LINE 17
9 13;... % LINE 18
10 14;... % LINE 19
11 15;... % LINE 20
12 16;... % LINE 21
13 14;... % LINE 22
14 15;... % LINE 23
15 16]; % LINE 24
% PREPARE FACE
FACE{1} = [1 5 8 4];
FACE{2} = [2 6 9 5];
FACE{3} = [3 7 10 6];
FACE{4} = [8 12 15 11];
FACE{5} = [9 13 16 12];
FACE{6} = [10 14 17 13];
FACE{7} = [15 19 22 18];
FACE{8} = [16 20 23 19];
FACE{9} = [17 21 24 20];
% MESHING
[coord, EleConnTbl,NodesOnLine,EdgesOnLine,ElementsOnFace] = FEMPREPROS(POINT,LINE,
FACE,hdata);
nNode = size(coord,1);
nEle = size(EleConnTbl,1);
if size(EleConnTbl,1) > 200
PlotCntrl.lettering = 0;
else
PlotCntrl.lettering = 1;
end
PlotCntrl.markersize = 3;
PLOTMESH(coord, EleConnTbl, PlotCntrl)
plot(Rebar(:,1),Rebar(:,2),'bo','markerfacecolor','r','markersize',15,'linewidth',
0.5);
%% CONFINEMENT PARAMETER %%
When Reached
elseif (Confinement.IDCover == 5) %#5:MANDER
UNString = 'Mander';
[Unconfined.fcc,Unconfined.ecc] = ManderParam_CoverSpall(Concrete);
Unconfined.ecu = Mander85_CoverSpall(Concrete,Unconfined); % Ultimate Strain Drops
to Zero When Reached
elseif (Confinement.IDCover == 6) %#6:ATTARD-SETUNGE
UNString = 'AttardSetunge';
[Unconfined,Concrete] = AttardParam_CoverSpall(Concrete);
Unconfined.ecu = Attard85_CoverSpall(Concrete,Unconfined); % Ultimate Strain Drops
to Zero When Reached
end
figure;
plot(Strain,Stress,':r*');
title('Axial Stress - Axial Strain Diagram')
xlabel('Axial Strain') % x-axis label
ylabel('Axial Stress (MPa)') % y-axis label
SI1 = ['\leftarrow Peak[',num2str(SigPeak),',', num2str(StrPeak),']'];
SI2 = ['\leftarrow 85%[',num2str(Sig85),',', num2str(Str85),']'];
SI3 = ['\leftarrow 50%[',num2str(Sig50),',', num2str(Str50),']'];
text(StrPeak,SigPeak,SI1);
text(Str85,Sig85,SI2);
text(Str50,Sig50,SI3);
figure;
plot(Strain,Force,':r*');
title('Axial Force - Axial Strain Diagram')
xlabel('Axial Strain') % x-axis label
ylabel('Axial Forces (kN)') % y-axis label
SI1 = ['\leftarrow Peak[',num2str(FPeak),',', num2str(StrPeak),']'];
SI2 = ['\leftarrow 85%[',num2str(F85),',', num2str(Str85),']'];
SI3 = ['\leftarrow 50%[',num2str(F50),',', num2str(Str50),']'];
text(StrPeak,FPeak,SI1);
text(Str85,F85,SI2);
text(Str50,F50,SI3);
StrainOut=Strain';
ForceOut=Force';
figure;
plot(CurvatureOut,Moment,':r*');
title('Moment - Curvature Diagram')
xlabel('Curvature (rad/mm)') % x-axis label
ylabel('Moment') % y-axis label
SI1 = ['\leftarrow Peak[',num2str(MPeak),',', num2str(CPeak),']'];
SI2 = ['\leftarrow 80%[',num2str(M80),',', num2str(C80),']'];
SI3 = ['\leftarrow 1stYield[',num2str(Moment(YieldIndex)),',', num2str(CurvatureOut
(YieldIndex)),']'];
text(CPeak,MPeak,SI1);
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 7 of 8
text(C80,M80,SI2);
text(CurvatureOut(YieldIndex),Moment(YieldIndex),SI3);
MOut = Moment';
CurOut = CurvatureOut';
MCOut(:,1)=MOut;
MCOut(:,2)=CurOut;
[ForceDrift,Drift] = Drift(Moment,CurvatureOut,Curvature,DriftInput);
[FDPeak,DPeak,FD80,D80] = DriftPoint(ForceDrift,Drift,Curvature);
figure;
plot(Drift,ForceDrift,':r*');
title('Lateral Force - Drift')
xlabel('Drift (mm)') % x-axis label
ylabel('Lateral Forces (kN)') % y-axis label
SI1 = ['\leftarrow Peak[',num2str(FDPeak),',', num2str(DPeak),']'];
SI2 = ['\leftarrow 80%[',num2str(FD80),',', num2str(D80),']'];
SI3 = ['\leftarrow 1stYield[',num2str(ForceDrift(YieldIndex)),',', num2str(Drift
(YieldIndex)),']'];
text(DPeak,FDPeak,SI1);
text(D80,FD80,SI2);
text(Drift(YieldIndex),ForceDrift(YieldIndex),SI3);
Header={'Stress','Strain','Force','Strain'};
xlswrite(filename,Header,'AxialCap','A1');
xlswrite(filename,transpose(Stress),'AxialCap','A2');
xlswrite(filename,(Strain),'AxialCap','B2');
xlswrite(filename,(Force),'AxialCap','C2');
xlswrite(filename,(Strain),'AxialCap','D2');
Header={'Moment','Curvature'};
xlswrite(filename,Header,'MoCur','A1');
xlswrite(filename,transpose(Moment),'MoCur','A2');
xlswrite(filename,transpose(CurvatureOut),'MoCur','B2');
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 8 of 8
Header={'Force','Drift'};
xlswrite(filename,Header,'ForceDrift','A1');
xlswrite(filename,transpose(ForceDrift),'ForceDrift','A2');
xlswrite(filename,transpose(Drift),'ForceDrift','B2');
%% SUMMARY STRESS-STRAIN %%
fprintf(' \n');
fprintf('STRESS-STRAIN SUMMARY !!!\n');
fprintf('Peak Stress (fcc) in MPa = %f \n', Confined.fcc);
fprintf('Peak Strain (ecc) = %f \n', Confined.ecc);
fprintf('Volumetric Ratio of Lateral Steel Reinforcement (Rhos) = %f \n', Confined.
Rhos);
fprintf('Lateral Pressure (fl) in MPa = %f \n', Confined.fl);