#example 11.1
import math
#parta
phi=30.0; # angle in degree
pa=2000.0;
q=100*50/1000.0;
Nq=55.0;
Ap=16*16/16/12; # area in ft^2
Qp=Ap*q*Nq; # in kip
qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb
print round(Qp,2),"ultimate load in lb"
print round(qp/1000,2),"ultimate load in kip"
print "there is change in answer because of calculation mistake in the book"
#partb
Nsigma=36;
Ap=16*16.0/12.0/12;
q=110*50.0/1000;
Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip
print round(Qp,2),"ultimate load in kip"
#partc
Nq=18.4;
Qp=Ap*q*Nq; # in kip
print round(Qp,2),"ultimate load in kip"
# ANSWER IN THE BOOK IS WRONG
#example 11.2
import math
#parta
K=1.3;
f0=0;
Delta=0.8*30; # in ft
D=16.0/12; # in ft
L1=50.0;
p=4*16/12.0; # in ft
Gamma=110/1000.0; # in lb/ft^3
L=15*D; # in ft
sigma=Gamma*L; # in kip/ft^2
f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2
Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);
print round(Qs,2),"ultimate load in kip"
#partb
FS=4; # factor of safety
Qp=56.45/3+234.7/3+179.9/3; # in kip
Qu=Qs+Qp; # in kip
Qall=Qu/FS; # in kip
print round(Qall,2),"is allowed load in kip"
#example 11.3
import math
K=0.25;
Ap=16*16.0/12/12; # area in ft^2
phi=30*math.pi/180;
Nq=25;
q=110*50.0/1000; # in kip
sigmao=q/2; # in kip/ft^2
p=4*16.0/12; # in ft
L=50; # in ft
FS=4; # factor of safety
Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip
Qall=Qu/FS; # in kip
print round(Qall,1),"allowed load in kip"
#example 11.4
import math
import numpy
FS=4; # factor of safety
Ap=0.1295; # area in m^2
Nc=9;
cu2=100;
Qp=Ap*Nc*cu2; # in kN
D=[5, 10, 30]; # depth in m
avgD=[2.5, 7.5,20.0]; # average depth in m
sigma=[45.0, 110.5, 228.5]; # in KN/m^2
cu=[30, 30, 100]; # in kN/m^2
alpha=[0.6, 0.9, 0.725];
L=[5, 5, 20]; # in m
p=math.pi*0.406;
Qs=0; # in kN
cusig=numpy.zeros(3)
print round(Qp,2),"bearing capacity in kN"
print "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n"
for i in range(0,3):
cusig[i]=cu[i]/sigma[i];
Qs=Qs+alpha[i]*cu[i]*L[i]*p;
print round(D[i],2),"\t \t \t",round(avgD[i],2),"\t \t",round(sigma[i],2),"\t\t\t ",round(cu[i],2),"\t ",round(cusig[i],2),"\t\t ",round(alpha[i],2),"\n"
print round(Qs,2),"bearing capacity in kN"
#part2
Lambda=0.136;
L=30;
fav=Lambda*(178.48+2*76.7);
Qs2=p*L*fav; # in kN
#part3
fav1=13;
fav2=31.9;
fav3=93.43;
Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN
print round(Qs3,1),"bearing capacity in kN"
Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN
Qu=Qp+Qsavg # in kN
Qall=Qu/FS; # in kN
print round(Qall,1),"allowed bearing capacity in kN"
#example 11.5
import numpy
D=[6, 12, 20]; # depth in m
fc=[34.34, 54.94, 70.63]; # in kN/m**2
alpha=[0.84, 0.71, 0.63];
dL=[6, 6, 8]; # in m
p=4*0.305;
Qs=0;
Q=numpy.zeros(3)
print " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n"
for i in range (0,3):
Q[i]=alpha[i]*fc[i]*p*dL[i];
Qs=Q[i]+Qs;
print D[i],"\t\t ",fc[i],"\t ",alpha[i],"\t ",dL[i],"\t\t ",round(Q[i],2)
print round(Qs),"bearing force in kN"
#example 11.6
import math
L=21; # in m
Qwp=502-350; # in kN
Qws=350; # in kN
Ap=0.1045; # area in m^2
Ep=21e6; # in kN/m^2
epsilon=0.62;
Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m
#part2
Iwp=0.85;
qwp=152/Ap;
Es=25e3; # in kN/m^2
D=0.356; # in m
mus=0.35;
Se2=qwp*D/Es*Iwp*(1-mus**2); # in m
#part3
p=1.168;
Iws=2+0.35*math.sqrt(L/D);
Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m
Se=Se1+Se2+Se3; # in m
print round(Se*1000,1),"settlement in mm"
#example 11.7
Ep=207e6; # in kN/m^2
Ip=123e-6; # in m^4
nh=12000; # in kN/m^3
#from table 11.13
xz=0.008;
Ax=2.435;
T=(Ep*Ip/nh)**0.2;
Qg1=xz*Ep*Ip/Ax/T**3;
#part2
Fy=248000;
d1=0.254;
Am=0.772;
Mzmax=Fy*Ip*2/d1; # in Kn-m
Qg2=Mzmax/Am/T; # in kN
if Qg2>Qg1 :
Qg=Qg1;
print round(Qg,2),"lateral load in kN"
# there is slight variation in answer in textbook due to approximation
#example 11.8
import math
#part1
Ep=207e6; # in kN/m^2
Ip=123e-6; # in m^4
nh=12000; # in kN/m^3
#from table 11.1a
xo=0.008; # in m
L=25;
Fy=248000; # yield stress in kN/m^2
D=0.254;
Am=0.772;
Gamma=18.0; # in kN/m^3
phi=35; # in angle
Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;
My=Fy*Ip*2/D; # in kN-m
Qug=140*Kp*D**3*Gamma; # in kN
#part2
Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN
if Qug>Qg1:
Qg=Qg1;
print round(Qg,2),"lateral load in kN"
#example 11.9
import math
Wrh=30*12; # in kip-ft
E=0.8;
Wr=7.5; # in kip
S=1/8.0;
C=0.1;
FS=6; # in factor of safety
n=0.4; # Coefficient of restitution
Wp=12/12.0*12/12.0*80*150+550; # in lb
Wp=Wp/1000.0;
Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip
Qall=Qu/FS; # in kip
print round(Qall),"allowed bearing capacity in kip"
#part2
He=30*12.0;
L=80*12.0;
Ap=12*12.0; # area in in^2
Ep=3e6/1000.0; # in kip/in^2
FS=4; # factor of safety
Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip
Qall2=Qu/FS; # in kip
print round(Qall2),"allowed bearing capacity in kip"
#partc
a=27;
b=1;
He=30;
FS=3; # factor of safety
Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip
Qall3=Qu/FS; # in kip
print round(Qall3),"allowed bearing capacity in kip"
#example 11.10
Hp=350; # in HP
vp=0.0016; # in m/s
Sl=0.762e-3; # in m/cycle
f=115; # in Hz
Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN
print round(Qu),"pile load capacity in kN"
#example 11.11
Lg=9.92; # in ft
Bg=7.0; # in ft
n1=3.0;
Nc=8.75;
n2=4.0/1000;
Ap=14.0**2.0/12.0**2;
cup=1775.0;
a1=0.4;#alpha1
p=4*14.0/12.0;
cu1=1050.0; # in lb/ft^2
L1=15.0;
a2=0.54;#alpha2
cu2=1775.0; # in lb/ft^2
L2=45.0;
FS=4; # factor of safety
Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip
Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip
print round(Qu2/1000),"load in kip"
Qall=Qu/FS; # in kip
print round(Qall),"allowed load in kip"
#example 11.12
import math
z1=21/2.0; # in ft
Lg=9.0; # in ft
Bg=6.0;# in ft
Qg=500*1000.0; # in kip
Cc1=0.3;
Cc2=0.2;
Cc3=0.25;
H2=12;
H3=6;
H1=21;
e1=0.82;
e2=0.7;
e3=0.75;
s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3
s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3
s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3
ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3
ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3
ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3
sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch
sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch
sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch
sc=sc1+sc2+sc3; # in inch
print round(sc*12,1),"total settlement in inch"