#example 12.1
import math
Ap=math.pi/4*1.75**2; # area in m^2
FS=4; # factor of safety
Nq=37.75;
L=8;
Es=50000.0;
mus=0.265;
pu=100.0;
Db=1.75; # in m
q=6*16.2+2*19.2;
phi=36*math.pi/180.0;
Fqs=1+math.tan(phi);
Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);
Ir=Es/(2*(1+mus)*q*math.tan(phi));
delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;
Irr=Ir/(1+Ir*delta);
Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));
Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);
Qpall=Qp/FS;
print round(Qpall,2),"allowed load in kN"
print "due to rounding off error there is slight change in answer"
#example 12.2
import math
Ap=math.pi/4*1.75**2; # area in m^2
q=135.6;
w=0.83;
FS=4; # factor of safety
phi=36; # given angle
Nq=0.21*math.exp(0.17*phi);
Qp=Ap*q*(w*Nq-1); # in kN
Qpall=Qp/FS; # in kN
print round(Qpall),"allowed load in kN"
#example 12.3
import math
Ap=math.pi/4*1.5**2; # area in m^2
Db=1.5; # in m
z=3.0;
p=math.pi*1;
Li=6.0;
N60=30.0;
sigmazi=16*z;
Beta=2.0-0.15*z**0.75;
fi=Beta*sigmazi; # in kN/m^2
qp=57.5*N60; # in kN/m^2
qpr=1.27/Db*qp; # in kN/m^2
Qunet=qpr*Ap+fi*p*Li; # in kN
print round(Qunet,2),"allowed load in kN"
#part b
k1=0.315; #from table
k2=12.0/1.5/1000*100.0;
Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN
print round(Qunet2,2),"allowed load in kN"
# the answer is slightly different in textbook due to approximation
#example 12.4
Nc=9;
Ap=math.pi/4*1.5**2; # area in m^2
cu=105; # in kN/m^2
Qpnet=Ap*cu*Nc; # in kN
print round(Qpnet),"net ultimate bearing point capacity in kN"
#part2
alpha=0.4;
Ds=1.5; # in m
p=math.pi*Ds;
Qs=alpha*p*(50*8+105*3); # in kN
print int(Qs),"skin resistance in kN"
#part3
FS=3; # factor of safety
Qu=Qpnet/FS+Qs/FS; # in kN
print round(Qu,2),"working load in kN"
#example 12.5
import math
cub=3000;
L=20+5; # in ft
Db=4; # in ft
Ap=math.pi/4*Db**2; # area in ft^2
alpha=0.55;
cu1=800; # in lb/ft^2
L1=7; # in ft
L2=5.5; # in ft
cu2=1200; # in lb/ft^2
p=math.pi*2.5;
k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi
j1=6*cub*(1+0.2*L/Db);
j2=9*cub;
qp=min(j1,j2);
Qu=k/1000+qp*Ap/1000; # in kip
print round(Qu),"allowed load in kip"
#part b
k1=0.57; #from table
k2=0.89;
Qunet2=qp*Ap*k1+k*k2; # in kip
print round(Qunet2/1000,2),"allowed load in kip"
#example 12.6
import math
Qws=1005-250; # in kN
Qwp=250; # in kN
epsilon=0.65;
L=11; # in m
Ds=1.5; # in m
Es=14000; # in kN/m^2
Ap=math.pi/4*1.5**2; # area in m^2
Ep=21e6; # in kN/m^2
Cp=0.04; # in kN/m^2
Db=1.5;
mus=0.3;
p=math.pi*1.5;
Nc=9;
qp=105*Nc; # in kN/m^2
se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m
se2=Qwp*Cp/(Db*qp); # in m
Iws=2+0.35*math.sqrt(L/Ds);
se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m
se=se1+se2+se3; # in m
print round(se*1000,2)," is net settlement in mm"
# the answer is slightly different in textbook due to approximation
#example 12.7
import math
import numpy
from scipy.optimize import fsolve
Ds=1.0;
Ep=22e6;
Ri=1.0;
cu=100.0;
Ip=math.pi*Ds**4/64.0;
Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;
print round(Qc,2),"bearing force in kN"
Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;
print round(Mc,2),"bearing moment in kNm"
#from figure
xoQM=0.0046*1;
xoMQ=0.0041*1;
xo=0.5*(xoQM+xoMQ);
print round(xo*1000,2),"net ground line deflection in mm"
#partb
Ip=0.049;
Qg=150.0;
Mg=200.0;
def f(T):
return 338e-6*T**3+300.6e-6*T**2-0.00435
[x]=fsolve(f,2);
T=x;
k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T
Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];
Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];
print "z/T\t Am\t Bm\t Mz(kN-m)\n"
Mz=numpy.zeros(7)
for i in range(0,7):
Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;
print k[i],"\t",round(Am[i],2),"\t",round(Bm[i],2),"\t",round(Mz[i],2)
print round(1*T,2),"depth in m"
#partc
Mmax=400;
sigma=Mmax*Ds/2/Ip;
print round(sigma,2),"tensile stress in kN/m**2"
#partd
#from figure
k=8.5;
L=k*1;
print L,"length in m"
# the answer is slightly different in textbook due to approximation
#example 12.8
qu=3000; # lb/in^2
Ds=3*12; #in inch
L=15*12; # in inch
FS=3; # factor of safety
Ecore=0.36e6; # in lb/in^2
f=min(2.5*qu**0.5,0.15*qu);
Qu=math.pi*Ds*L*f/1000; # in kip
Emass=Ecore*(0.266*80-1.66); # in lb/in^2
Ec=17.9*Emass; # in lb/in^2
Ac=math.pi/4*Ds**2; # area in in^2
If=0.35;
se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;
Qall=Qu/FS; # in kip
print round(Qall),"allowed load in kip"