0% found this document useful (0 votes)
42 views3 pages

% Incremento Per Capacity Design

This document contains MATLAB code that analyzes the forces and stresses in a shell structure. It loads shell element data, calculates membrane forces, normal forces, required reinforcement areas, and other parameters at each node. The results are plotted, saved to files, and maximum reinforcement areas are identified.

Uploaded by

Paolo Martinis
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)
42 views3 pages

% Incremento Per Capacity Design

This document contains MATLAB code that analyzes the forces and stresses in a shell structure. It loads shell element data, calculates membrane forces, normal forces, required reinforcement areas, and other parameters at each node. The results are plotted, saved to files, and maximum reinforcement areas are identified.

Uploaded by

Paolo Martinis
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/ 3

new 3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

clc; clf; clear all;


warning('off');
load SHELL
h=.7;
c=.05;
d=h-2*c; zi=d/2; zs=d/2;
fyd=391.3;
SHELL.Properties.VariableUnits = {'' '' 'm' 'm' 'kN/m' 'kN/m' 'kN/m' 'kNm/m'
'kNm/m' 'kNm/m' 'kN/m' 'kN/m'};
SHELL = sortrows(SHELL,'LoadCaseCombo','ascend');
A=SHELL(:,2);
B=unique(A);
C=size(A,1)/size(B,1);
B=table2array(B);
for k=1:size(B,1)
D=SHELL(((k-1)*C)+1:k*C,:);
E=table2array(D(:,5:12));
x=table2array(D(:,3));
y=table2array(D(:,4));
ux = unique(x);
uy = unique(y);
[X,Y]=meshgrid(ux,uy);
fig(k)=figure('Name','FORCES');
fig(k).WindowStyle='docked';
fig(k).PaperType='a4';
fig(k).PaperOrientation='landscape';
fig(k).PaperUnits='normalized';
fig(k).PaperPosition=[.05 .05 .90 .90];
for i=1:8
z=E(:,i);
F = scatteredInterpolant(x,y,z);
Z=F(X,Y);
contourf(X,Y,Z,'LineStyle','none'); axis equal tight;
colormap cool;
hold on; pianta; hold off;
title(strcat(SHELL.Properties.VariableNames(i+4),{' - '},B(k)));
cb=colorbar;
set(get(cb,'title'),'string',SHELL.Properties.VariableUnits(i+4));
if k==1 && i==1
print('-dpsc','-r600','-painters','out.ps');
else print('-append','-dpsc','-r600','-opengl','out.ps');
end
end
% incremento per Capacity Design
E=E*1.1;
% forze membranali layer superiore
Txs=(E(:,1)*zi-E(:,4))/d;
Tys=(E(:,2)*zi-E(:,5))/d;
Txys=(E(:,3)*zi-E(:,6))/d;
n1xs=Txs+abs(Txys); n2xs=Txs+(power(Txys,2)./abs(Tys));
n1ys=Tys+abs(Txys); n2ys=Tys+(power(Txys,2)./abs(Txs));
for ii=1:length(Txs)
if Tys(ii)>=-abs(Txys(ii)) nxs(ii)=n1xs(ii); else nxs(ii)=n2xs(ii); end
if nxs(ii)>0 nxi(ii)=nxs(ii); Fcxs(ii)=-2*abs(Txys(ii));
else nxs(ii)=0; Fcxs(ii)=Txs(ii)+(power(Txys(ii),2)./Tys(ii)); end
if Txs(ii)>=-abs(Txys(ii)) nys(ii)=n1ys(ii); else nys(ii)=n2ys(ii); end
if nys(ii)>0 nys(ii)=nys(ii); Fcys(ii)=-2*abs(Txys(ii));
else nys(ii)=0; Fcys(ii)=Tys(ii)+(power(Txys(ii),2)./Txs(ii)); end
end
% forze membranali layer inferiore
Txi=(E(:,1)*zs+E(:,4))/d;
Tyi=(E(:,2)*zs+E(:,5))/d;
Txyi=(E(:,3)*zs+E(:,6))/d;
n1xi=Txi+abs(Txyi); n2xi=Txi+(power(Txyi,2)./abs(Tyi));
n1yi=Tyi+abs(Txyi); n2yi=Tyi+(power(Txyi,2)./abs(Txi));
for ii=1:length(Txs)
if Tyi(ii)>=-abs(Txyi(ii)) nxi(ii)=n1xi(ii); else nxi(ii)=n2xi(ii); end
if nxi(ii)>0 nxi(ii)=nxi(ii); Fcxi(ii)=-2*abs(Txyi(ii));
else nxi(ii)=0; Fcxi(ii)=Txi(ii)+(power(Txyi(ii),2)./Tyi(ii)); end
if Txi(ii)>=-abs(Txyi(ii)) nyi(ii)=n1yi(ii); else nyi(ii)=n2yi(ii); end
if nyi(ii)>0 nyi(ii)=nyi(ii); Fcyi(ii)=-2*abs(Txyi(ii));
else nyi(ii)=0; Fcyi(ii)=Tyi(ii)+(power(Txyi(ii),2)./Txi(ii)); end
end

new 3

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

% riepilogo
T=[Txs Tys Txys Txi Tyi Txyi];
N=[nxs' nys' nxi' nyi'];
As=N*10/(0.9*fyd);
Fc=[Fcxs' Fcys' Fcxi' Fcyi'];
Fc(:,5)=min(Fc(:,1:2),[],2)./(1000*2*c);
Fc(:,6)=min(Fc(:,3:4),[],2)./(1000*2*c);
T1s=(T(:,1)+T(:,2))/2+power(power(T(:,1)-T(:,2),2)+4*power(T(:,3),2),0.5)/2;
T2s=(T(:,1)+T(:,2))/2-power(power(T(:,1)-T(:,2),2)+4*power(T(:,3),2),0.5)/2;
T1i=(T(:,4)+T(:,5))/2+power(power(T(:,4)-T(:,5),2)+4*power(T(:,6),2),0.5)/2;
T2i=(T(:,4)+T(:,5))/2-power(power(T(:,4)-T(:,5),2)+4*power(T(:,6),2),0.5)/2;
Tp=[T1s T2s T1i T2i];
alphas(:,1)=max(Tp(:,1:2),[],2)./min(Tp(:,1:2),[],2);
alphai(:,1)=max(Tp(:,3:4),[],2)./min(Tp(:,3:4),[],2);
CALC=[T N As Fc Tp alphas alphai];
TABCALC = array2table(CALC,...
'VariableNames',{'Txs' 'Tys' 'Txys' 'Txi' 'Tyi' 'Txyi'...
'nxs' 'nys' 'nxi' 'nyi' 'Asxs' 'Asys' 'Asxi' 'Asyi'...
'Fcxs' 'Fcys' 'Fcxi' 'Fcyi' 'fcs' 'fci'...
'T1s' 'T2s' 'T1i' 'T2i' 'alphas' 'alphai'});
TABCALC.Properties.VariableUnits={'kN/m' 'kN/m' 'kN/m' 'kN/m' 'kN/m' 'kN/m'
...
'kN/m' 'kN/m' 'kN/m' 'kN/m' 'cmq/m' 'cmq/m' 'cmq/m' 'cmq/m'...
'kN/m' 'kN/m' 'kN/m' 'kN/m' 'MPa' 'MPa'...
'kN/m' 'kN/m' 'kN/m' 'kN/m' '' ''};
% PLOT
for i=1:24
z=CALC(:,i);
F = scatteredInterpolant(x,y,z);
Z=F(X,Y);
contourf(X,Y,Z,'LineStyle','none'); axis equal tight;
colormap cool;
hold on; pianta; hold off;
title(strcat(TABCALC.Properties.VariableNames(i),{' - '},B(k)));
cb=colorbar;
set(get(cb,'title'),'string',TABCALC.Properties.VariableUnits(i));
print('-append','-dpsc','-r600','-opengl','out.ps');
end
save(char(B(k)),'D','TABCALC')
xlswrite('INPUTS.xlsx',D.Properties.VariableNames,char(B(k)),'A1');
writetable(D,'INPUTS.xlsx','Sheet',char(B(k)),'Range','A2');
xlswrite('INPUTS.xlsx',D.Properties.VariableUnits,char(B(k)),'A2');
xlswrite('CALCOLI.xlsx',TABCALC.Properties.VariableNames,char(B(k)),'A1');
writetable(TABCALC,'CALCOLI.xlsx','Sheet',char(B(k)),'Range','A2');
xlswrite('CALCOLI.xlsx',TABCALC.Properties.VariableUnits,char(B(k)),'A2');
%
writetable(D,'INPUTS.xlsx','Sheet',char(B(K)));
%
writetable(TABCALC,'TABCALC.xlsx','Sheet',char(B(K)));
Asxs(:,k)=As(:,1);
Asys(:,k)=As(:,2);
Asxi(:,k)=As(:,3);
Asyi(:,k)=As(:,4);
end
Asmax(:,1)=max(Asxs,[],2);
Asmax(:,2)=max(Asys,[],2);
Asmax(:,3)=max(Asxi,[],2);
Asmax(:,4)=max(Asyi,[],2);
xlswrite('CALCOLI.xlsx',TABCALC.Properties.VariableNames(11:14),'Asmax','A1');
xlswrite('CALCOLI.xlsx',TABCALC.Properties.VariableUnits(11:14),'Asmax','A2');
xlswrite('CALCOLI.xlsx',Asmax,'Asmax','A3');
%%
for i=1:4
z=Asmax(:,i);
F = scatteredInterpolant(x,y,z);
Z=F(X,Y);
contourf(X,Y,Z,'LineStyle','none','ShowText','on','TextStep',2); axis equal
tight;
colormap cool;
hold on; pianta; hold off;
title(strcat(TABCALC.Properties.VariableNames(10+i),{' MAX'}));
cb=colorbar;

new 3

144
145
146
147
148
149
150
151
152
153
154

set(get(cb,'title'),'string',TABCALC.Properties.VariableUnits(10+i));
if i==1
print('-dpsc','-r600','-painters','As.ps');
else print('-append','-dpsc','-r600','-opengl','As.ps');
end
end
ps2pdf('psfile', 'As.ps', 'pdffile', 'As.pdf', 'gspapersize', 'a4');
max(Asmax,[],1)
%%
ps2pdf('psfile', 'out.ps', 'pdffile', 'out.pdf', 'gspapersize', 'a4');

You might also like