-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.m
146 lines (122 loc) · 4.43 KB
/
main.m
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
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
144
145
146
% Program to claculate Bearing Capacity
clc
clear
%% Initialisation [PRE-PROCESSING]
% Following are the main variables used. No explanation is given as
% names are self explanatory.
%
load input.mat
%Variable initialisation
%Global_stiffness_matrix(Number_of_nodes,Number_of_nodes) = 0;
%% [PROCESSING]
phiPrime = atand(0.67 * tand(phi));
NcPrime = interp1(Bearing_capacity_factors(:,1), ...
Bearing_capacity_factors(:,2), phiPrime);
NqPrime = interp1(Bearing_capacity_factors(:,1), ...
Bearing_capacity_factors(:,3), phiPrime);
NgPrime = interp1(Bearing_capacity_factors(:,1), ...
Bearing_capacity_factors(:,4), phiPrime);
q=Unit_weight_of_soil*Depth_of_foundation;
Nphi= (tand(45 + phi/2))^2;
function rectangle(Width_of_foundation, Length_of_foundation, Depth_of_foundation, Nphi, phi, alpha, Dw, Cohesion, NcPrime, q, NqPrime, Gamma, NgPrime)
for i=1:8
rectangle2(i)=1.0+0.2*Width_of_foundation(i)/Length_of_foundation;
rectangle1(i)=1.0+0.2*Width_of_foundation(i)/Length_of_foundation;
rectangle3(i)=1.0-0.4*Width_of_foundation(i)/Length_of_foundation;
Sq(i)=rectangle2(i);
Sc(i)=rectangle1(i);
Sg(i)=rectangle3(i);
Dc(i)= 1+(0.2)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi);
if (phi<10);
Dq=Dg=1;
elseif (phi>10);
Dq(i)=(1+(0.1)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi));
Dg(i)=(1+(0.1)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi));
endif
ic= ( 1 - alpha/90)^2;
ig= ( 1- alpha/phi)^2;
iq= ( 1 - alpha/90)^2;
if(Dw>=(Depth_of_foundation+Width_of_foundation(i)));
W=1;
elseif(Dw<=Depth_of_foundation);
W= 0.5;
elseif(Depth_of_foundation<Dw<(Depth_of_foundation+Width_of_foundation(i)));
y(i)=0.5+[0.5*(Dw-Depth_of_foundation)]/[Width_of_foundation(i)];
W(i)=y(i);
end
qdprime(i)= 0.66*Cohesion*NcPrime*Sc(i)*Dc(i)*ic+ q*(NqPrime-1)*Sq(i)*Dq(i)*iq + 0.5*Width_of_foundation(i)*Gamma*NgPrime*Sg(i)*Dg(i)*ig*W(i);
Safe_Net_Allowable_Bearing_Capacity(i) = qdprime(i)/2.5;
qdprimespt(i)= q*(NqPrime-1)*Dq(i)*iq*Sq(i)+ 0.5*Width_of_foundation(i)*Gamma*NgPrime*Sg(i)*Dg(i)*ig;
Safe_Net_Allowable_Bearing_Capacityspt(i) = qdprimespt(i)/2.5;
if (Safe_Net_Allowable_Bearing_Capacity(i))<(Safe_Net_Allowable_Bearing_Capacityspt(i));
a=Safe_Net_Allowable_Bearing_Capacity(i)
elseif(Safe_Net_Allowable_Bearing_Capacity(i))>(Safe_Net_Allowable_Bearing_Capacityspt(i));
b=Safe_Net_Allowable_Bearing_Capacityspt(i)
end
end
endfunction
switch (shape)
case "rectangle"
rectangle(Width_of_foundation, Length_of_foundation, Depth_of_foundation, Nphi, phi, alpha, Dw, Cohesion, NcPrime, q, NqPrime, Gamma, NgPrime);
break;
case "strip"
Sq=1;
Sc=1;
Sg=1;
case "circle"
Sq=1.2;
Sc=1.3;
Sg=0.6;
otherwise
Sq=1.2;
Sc=1.3;
Sg=0.8;
endswitch
for i=1:9
Dc(i)= 1+(0.2)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi);
if (phi<10);
Dq=Dg=1;
elseif (phi>10);
Dq(i)=(1+(0.1)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi));
Dg(i)=(1+(0.1)*(Depth_of_foundation/Width_of_foundation(i))*sqrt(Nphi));
endif
ic= ( 1 - alpha/90)^2;
ig= ( 1- alpha/phi)^2;
iq= ( 1 - alpha/90)^2;
if(Dw>=(Depth_of_foundation+Width_of_foundation(i)));
W=1;
elseif(Dw<=Depth_of_foundation);
W= 0.5;
elseif(Depth_of_foundation<Dw<(Depth_of_foundation+Width_of_foundation(i)));
y(i)=0.5+[0.5*(Dw-Depth_of_foundation)]/[Width_of_foundation(i)];
W(i)=y(i);
endif
qdprime(i)= 0.66*Cohesion*NcPrime*Sc*Dc(i)*ic+ q*(NqPrime-1)*Sq*Dq(i)*iq + 0.5*Width_of_foundation(i)*Gamma*NgPrime*Sg*Dg(i)*ig*W(i);
Safe_Net_Allowable_Bearing_Capacity(i) = qdprime(i)/2.5;
qdprimespt(i)= q*(NqPrime-1)*Dq(i)*iq*Sq+ 0.5*Width_of_foundation(i)*Gamma*NgPrime*Sg*Dg(i)*ig;
Safe_Net_Allowable_Bearing_Capacityspt(i) = qdprimespt(i)/2.5;
if (Safe_Net_Allowable_Bearing_Capacity(i))<(Safe_Net_Allowable_Bearing_Capacityspt(i));
a=Safe_Net_Allowable_Bearing_Capacity(i)
elseif(Safe_Net_Allowable_Bearing_Capacity(i))>(Safe_Net_Allowable_Bearing_Capacityspt(i));
b=Safe_Net_Allowable_Bearing_Capacityspt(i)
endif
end
% Output
ic
iq
ig
Dc
Dq
Dg
Sc
Sq
Sg
phiPrime
NcPrime
NqPrime
NgPrime
qdprime
Safe_Net_Allowable_Bearing_Capacity
qdprimespt
Safe_Net_Allowable_Bearing_Capacityspt
% End of file