import math
#Determine the relationships for peak shear strength(tf) and residual shear strength(tr).
D=50 ## in mm
A= math.pi/4. *(D/1000.)**2
## solving for test 1
N=150.
Sp=157.5
Sr=44.2
Tf=Sp/A
Tr=Sr/A
## from graph
k=math.tan(27/57.3)
k1=math.tan(14.6/57.3)
print'%s %.3f %s'%('Peak strength Tf = 40+ t*',k,'')
print'%s %.3f %s'%(' Residual strength Tr = t*',k1,'')
import math
#Determine
#a.Angle of friction,f
#b.Angleuthat the failure plane makes with the major principal plane
T3=16. ## lb/in^2
Tf=25. ## lb/in^2
T1=T3+Tf
a= math.asin((T1-T3)/(T1+T3))*57.3 ## Mohr's circle
print'%s %.2f %s'%('a)Angle of friction,a = ',a,'')
b= 45.+ a/2.
print'%s %.2f %s'%(' b)Angle b that the failure plane makes with the major principal plane = ',b,'')
import math
#Find the normal stress sand the shear stress tfon the failure plane.
#b.Determine the effective normal stress on the plane of maximum shear stress
T1=41.
T3=16.
a=58.
T=(T1+T3)/2. + (T1-T3)*math.cos(2.*a/57.3)/2.
tf=(T1-T3)*math.sin(2.*a/57.3)/2
print'%s %.2f %s'%('a)the normal stress T = ',T,' lb/in^2')
print'%s %.2f %s'%('(b) and the shear stress tf = ',tf,' lb/in^2')
import math
#The equation of the effective stress failure envelope for normally consolidated clayey soilistf stan 30. A drained triaxial test was conducted with the same soil at a chamberconfining pressure of 10 lb/in.2Calculate the deviator stress at failure.
##For normally consolidated clay, c' = 0.
a=30.
T3=10.
T1=T3*(math.tan(60/57.3))**2
Tf=T1-T3
print'%s %.2f %s'%('The deviator stress at failure = ',Tf,' lb/in^2')
import math
#Determine the shear strength parameters.
T13=70.
T1f=130.
T11=T13+T1f
T23=160.
T2f=223.5
T21=T23+T2f
a= 2*(math.atan(((T11-T21)/(T13-T23))**0.5) *57.3-45)
c= (T11-T13*((math.tan((45+a/2.)/57.3))**2)/(2*math.tan(45+a/2.)/57.3))
d=c-267
print'%s %.2f%s'%('the shear strength parameter d = ',d,' kN/m^2')
import math
#a.Consolidated-undrained angle of shearing resistance,f
#b.Drained friction angle,f
T3=12.
Tf=9.1
T1=T3+Tf
u=6.8
a=math.asin((T1-T3)/(T1+T3))
a1= math.asin((T1-T3)/(T1+T3-2*u))
print'%s %.1f %s'%('a)Consolidated-undrained angle of shearing resistance = ',a*57.3,' degrees')
print'%s %.1f %s'%(' b)Drained friction angle =',a1*57.3,' degrees')
import math
#What would be the deviatorstress at failure, (sd)f, if a drained test was conducted with the same chamber allaround pressure (that is, 12 lb/in.2)?
T3=12.
a=27.8
T1=T3*(math.tan(59./57.3))**2
Tf=T1-T3
print'%s %.1f %s'%('the deviator stress at failure = ',Tf,' lb/in^2')
import math
#Estimate the average undrained shear strength of the clay [that is,cu(VST)].
PI=28.
OCR=3.2
To=160.
Kn=0.11+0.0037*PI
Ko=OCR**0.8 * Kn
Cu=Ko*To
print'%s %.1f %s'%('the average undrained shear strength of the clay =',Cu,' kN/m^2')