0% found this document useful (0 votes)
25 views8 pages

Lembar Editor Matlab No 2

Uploaded by

Arthur Dahoklory
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views8 pages

Lembar Editor Matlab No 2

Uploaded by

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

10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.

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/>.%
% ####################################################################### %

clear all; clc;


% SET ROOT PTOJECT
parentpath = pwd();
addpath(genpath(parentpath));

%% LOADING LICENSE INFORMATION


fprintf('#####################################################\n');
fprintf('NON-LINEAR SECTIONAL REINFORCED CONCRETE ANALYSIS !!!\n');
fprintf('Copyright (C) 2015 Bambang Piscesa !!!\n');
fprintf('This Program is licensed under GNU GPL Version 3 !!!\n');
fprintf('#####################################################\n');
fprintf(' \n');

%% GENERAL INFORMATION %%
% DATA INPUT IS BASED ON NW3-4.5S30 %

%% CONCRETE MATERIAL MODEL %%


Concrete.fc = 40*0.85; % MPa
% Concrete.Ec = 3320 * (Concrete.fc)^0.5 + 6900; % Carrasquillo et al. (1981)
Concrete.Ec = 4700 * Concrete.fc^0.5; % Modulus of Elasticity
% Attard and Setunge
Concrete.Rho = 2200;
Concrete.AggType = 1; % 1:Strong Aggregate 2:Weak Aggregate
Concrete.SF = 1; % 1:Silica Fume is used 0: Silica fume is not used
Concrete.AlphaTi = 1;

%% STEEL MATERIAL MODEL LONGITUDINAL %%


Steel.ID = 1; % 1: USER
if (Steel.ID == 1)
Steel.fy = 400; % MPa
Steel.fu = Steel.fy*1.25; % MPa
Steel.Es = 200000; % MPa
Steel.YieldStrain = Steel.fy/Steel.Es;
Steel.UltStrain = 0.151;
Steel.Eh = 0; %(Steel.fu-Steel.fy)/(Steel.UltStrain-Steel.
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 2 of 8

YieldStrain); % MPa BiLinear Strain Hardening


Steel.Dia = 16; % mm (Diameter of Longitudinal Steel);
Steel.Area = 0.25*pi*Steel.Dia^2; % mm^2 Area of Longitudinal Steel
end

%% LATERAL STEEL ARRANGEMENT %%


LatSteel.ID = 1; % 1:USER
LatSteel.nx = 4; % Number of Steel in X-Direction
LatSteel.ny = 4; % Number of Steel in Y-Direction
LatSteel.Spacing = 100; % mm Spacing of Lateral Steel Reinforcement
LatSteel.SpacingEff = 100-10; % mm Effective Spacing of Lateral Steel Reinforcement
if (LatSteel.ID == 1)
LatSteel.Dia = 10; % mm
LatSteel.Area = 0.25*pi*LatSteel.Dia^2; % mm^2
LatSteel.fy = 400; % MPa
LatSteel.fu = LatSteel.fy*1.25; % MPa
LatSteel.Es = 200000; % MPa
LatSteel.YieldStrain = LatSteel.fy/LatSteel.Es;
LatSteel.UltStrain = 0.125;
LatSteel.Et = 0 ; %(LatSteel.fu-LatSteel.fy)/(LatSteel.UltStrain-LatSteel.
YieldStrain);
end

%% CROSS SECTION MODELING [MESH GENERATION-RECTANGULAR] %%


hdata.hmax = [10]; % Maximum Size of Elements (mm)
CT = 40; % Cover Thickness (mm)
B = 400; % Width of Column (mm)
H = 400; % Height of Column (mm)
ModelType = 1; % 1:COVER+CORE 2:ALL CORE

% 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];

% ASSIGN MATERIAL BEFORE MESH


if (ModelType == 1)
MATERIALINFACE = [1;1;1;1;2;1;1;1;1]; % 1 : COVER || 2 : CORE
else
MATERIALINFACE = [2;2;2;2;2;2;2;2;2]; % 1 : COVER || 2 : CORE
end

% 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)

% ASSIGN MATERIAL AFTER MESHED


for iface = 1:length(FACE)
EleMat(ElementsOnFace{iface},1) = MATERIALINFACE(iface);
end
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 4 of 8

%% STEEL POSITION AND AREA [X Y Area] %%


RebarConfig = 3; % 1:4 REBAR 2:8 REBAR 3:12 REBAR
if(RebarConfig == 1)
Rebar = [CT+Steel.Dia/2 CT+Steel.Dia/2 Steel.Area;... % BAR 1
B-(CT+Steel.Dia/2) CT+Steel.Dia/2 Steel.Area;... % BAR 2
CT+Steel.Dia/2 H-(CT+Steel.Dia/2) Steel.Area;... % BAR 3
B-(CT+Steel.Dia/2) H-(CT+Steel.Dia/2) Steel.Area]; % BAR 4
else
dist = (B-2*CT-Steel.Dia)/3.0;
Rebar = [CT+Steel.Dia/2 CT+Steel.Dia/2 Steel.Area;... % BAR 1
CT+Steel.Dia/2+dist CT+Steel.Dia/2 Steel.Area;... % BAR 2
CT+Steel.Dia/2+dist+dist CT+Steel.Dia/2 Steel.Area;... % BAR 3
B-(CT+Steel.Dia/2) CT+Steel.Dia/2 Steel.Area;... % BAR 4
CT+Steel.Dia/2 CT+Steel.Dia/2+dist Steel.Area;... % BAR 5
B-(CT+Steel.Dia/2) CT+Steel.Dia/2+dist Steel.Area;... % BAR 6
CT+Steel.Dia/2 CT+Steel.Dia/2+dist+dist Steel.Area;... % BAR 7
B-(CT+Steel.Dia/2) CT+Steel.Dia/2+dist+dist Steel.Area;...% BAR 8
CT+Steel.Dia/2 H-(CT+Steel.Dia/2) Steel.Area;... % BAR 9
CT+Steel.Dia/2+dist H-(CT+Steel.Dia/2) Steel.Area;... % BAR 10
CT+Steel.Dia/2+dist+dist H-(CT+Steel.Dia/2) Steel.Area;...% BAR 11
B-(CT+Steel.Dia/2) H-(CT+Steel.Dia/2) Steel.Area]; % BAR 12
end

plot(Rebar(:,1),Rebar(:,2),'bo','markerfacecolor','r','markersize',15,'linewidth',
0.5);

%% CONFINEMENT PARAMETER %%

% CONCRETE UNCONFINED PROPERTIES % COVER


Confinement.IDCover = 6; % Set Cover Stress-Strain Model
Unconfined.Spalling = 0; % 1 : Activated, 0 : Not Activated
if (Confinement.IDCover == 1) %#1:POPOVICS
UNString = 'Popovics';
Unconfined.ecc = 0.0005 * Concrete.fc ^ 0.4;
Unconfined.n = 0.8 + (Concrete.fc / 17);
Unconfined.ecu = Popovics85(Concrete,Unconfined); % Ultimate Strain Drops to Zero
When Reached
elseif (Confinement.IDCover == 2) %#2:HOGNESTAD
UNString = 'Hognestad';
Unconfined.ecc = 1.8 * Concrete.fc / Concrete.Ec;
Unconfined.ecu = 0.0038; % Ultimate Strain Drops to Zero When Reached
elseif (Confinement.IDCover == 3) %#3:THORENFELDT
UNString = 'Thorenfeldt';
Unconfined.n = 0.8 + (Concrete.fc / 17);
Unconfined.ecc = Concrete.fc / Concrete.Ec * Unconfined.n / (Unconfined.n - 1);
Unconfined.ecu = Thorenfeldt85(Concrete,Unconfined); % Ultimate Strain Drops to
Zero When Reached
elseif (Confinement.IDCover == 4) %#4:KENT PARK
UNString = 'KentPark (1971)';
Unconfined.ecc = 0.002;
Unconfined.e50u = (3 + Unconfined.ecc * Concrete.fc * 142) / (Concrete.fc * 142 -
1000);
Unconfined.e20u = 1.6 * (Unconfined.e50u - Unconfined.ecc) + Unconfined.ecc;
Unconfined.Zu = 0.5 / (Unconfined.e50u - Unconfined.ecc);
Unconfined.ecu = KentPark85(Concrete,Unconfined); % Ultimate Strain Drops to Zero
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 5 of 8

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

% CONCRETE CONFINED PROPERTIES [#1:MANDER] % CORE


Confinement.IDCore = 3; % Set Core Stress-Strain Model
if (Confinement.IDCore == 1) %#1:MANDER
CString = 'Mander (1988)';
[Confined.fcc,Confined.ecc,Confined.Rhos,Confined.fl] = ManderParam(Concrete,
Steel,LatSteel,B,H,CT,Rebar);
Confined.ecu = Mander85(Concrete,Confined);
elseif (Confinement.IDCore == 2) %#2:LEGERON
CString = 'Legeron (2003)';
[Confined.fcc,Confined.ecc,Confined.kk,Confined.k1,Confined.k2,Confined.Rhos,
Confined.fl] = LegeronParam(Concrete,Steel,LatSteel,B,H,CT,Rebar);
Confined.ecu = Legeron85(Concrete,Confined);
elseif (Confinement.IDCore == 3)
CString = 'AttardSetunge';
[Confined,Concrete] = AttardParam(Concrete,Steel,LatSteel,B,H,CT,Rebar);
Confined.ecu = Attard85(Concrete,Confined);
end

%% INTERACTION DIAGRAM ACI 318-1999/SNI 2847-2002 %%


[P,M,MaxStrain] = InteractionDiagramCode(coord, EleConnTbl,Concrete,Steel,Rebar);
[PACI,MACI] = ReductionACI(coord, EleConnTbl,P,M,Concrete);
[PACI08,MACI08] = ReductionACI08(coord, EleConnTbl,P,M,Concrete,MaxStrain);

%% INTERACTION DIAGRAM UNCONFINED %%


[PUN,MUN] = InteractionDiagramUnConfined(coord, EleConnTbl, Concrete, Steel, Rebar,
Confinement, Unconfined);

%% INTERACTION DIAGRAM CONFINED %%


[PC,MC] = InteractionDiagramConfined(coord, EleConnTbl, Concrete, Steel, Rebar,
Confinement, Confined, Unconfined, EleMat);

%% PLOT ALL INTERACTION DIAGRAM %%


figure;
plot(M,P,'-bo',MACI,PACI,':r*',MACI08,PACI08, '-bo', MUN,PUN,'-go',MC,PC,'-r+');
legend('ACI 318-99/08 Nominal','ACI 318-99 Reduced','ACI 318-08 Reduced', ['UnConfined
= ', UNString] ,['Confined = ', CString]);
title('Interaction Diagram')
xlabel('Moment Capacity (kN-m)') % x-axis label
ylabel('Axial Capacity (kN)') % y-axis label
xlim([0,inf]);
ylim([0,inf]);
10/20/22 6:54 PM C:\Users...\MainProgram_Nomorduatugas.m 6 of 8

%% AXIAL CAPACITY PARAMETER %%


Axial.Inc = 0.0001;
Axial.Step = 150;

%% AXIAL CAPACITY CHECK %%


[Stress,Force,Strain] = AxialCapacity(coord, EleConnTbl, Concrete, Unconfined,
Confined, Confinement, Steel, Rebar, Axial, EleMat);
[SigPeak,FPeak,StrPeak,Sig85,F85,Str85,Sig50,F50,Str50] = AxialPoint(Stress,Force,
Strain, Axial);

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';

%% MOMENT CURVATURE PARAMETER %%


Curvature.Inc = 0.0001; % Compression Fiber Check
Curvature.Step = 300; % Total Step of Moment Curvature
Curvature.AxialForce = 1000; % Axial Forces Applied (kN)

[Moment,CurvatureOut,YieldIndex] = CurvatureCapacity(coord, EleConnTbl, Concrete,


Unconfined, Confined, Confinement, Steel, Rebar, Curvature, EleMat);
[MPeak,CPeak,M80,C80] = CurvaturePoint(Moment,CurvatureOut,Curvature);

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;

%% LATERAL DRIFT PARAMETER %%


DriftInput.ColHeight = 1375-150; % Height of Column in mm

[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);

%% EXTRACT ALL DATA TO EXCEL %%


fprintf(' \n');
fprintf('EXTRACT ALL DATA TO EXCEL !!!\n');
% Output To Excel
filename = strcat(parentpath ,'\Output.xls');
Header={'Pn','Mn','PACI99','MACI99','PACI08','MACI08','PUn','MUn','PCon','MCon'};
xlswrite(filename,Header,'Interaction','A1');
xlswrite(filename,transpose(P),'Interaction','A2');
xlswrite(filename,transpose(M),'Interaction','B2');
xlswrite(filename,transpose(PACI),'Interaction','C2');
xlswrite(filename,transpose(MACI),'Interaction','D2');
xlswrite(filename,transpose(PACI08),'Interaction','E2');
xlswrite(filename,transpose(MACI08),'Interaction','F2');
xlswrite(filename,transpose(PUN),'Interaction','G2');
xlswrite(filename,transpose(MUN),'Interaction','H2');
xlswrite(filename,transpose(PC),'Interaction','I2');
xlswrite(filename,transpose(MC),'Interaction','J2');

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);

You might also like