import math
#Variable declaration
dia=12#in
r=dia/2
CQ=7#in
OC=6#in
OH=15#in
u=0.3
P=100#lb
#Calculations
phi=math.atan(u)
x=r*math.sin(phi)#in inches;radius of friction circle
a=5.82#from figure
Tb=P*OH*x/a#braking torque
#Result
print "The braking torque of the drum Tb= %.f lb"%Tb
import math
#Variable declaration
OH=15#in
l=OH
u=0.3
P=100#lb
dia=12#in
r=dia/2
#Calculations
phi=math.atan(u)
#according to fig 170(b)
#for clockwise rotation
a=6#from figure
x=r*math.sin(phi)#in inches;radius of friction circle
Tb=P*l*x/a#braking torque on the drum
#for counter clockwise rotation
a1=5.5#in
Tb1=P*l*x/a1#braking torque on the drum
#according to figure 172(a)
#for clockwise rotation
a2=6.48#from figure
x=r*math.sin(phi)#in inches;radius of friction circle
Tb2=P*l*x/a2#braking torque on the drum
#for counter clockwise rotation
a3=6.38#in
Tb3=P*l*x/a3#braking torque on the drum
T1=math.ceil(Tb1)
T2=math.ceil(Tb2)
T3=math.ceil(Tb3)
#Result
print "Braking torque on drum:\nWhen dimensions are measured from fig 170(b)\nFor clockwise rotation= %.f lb in"\
"\nFor counter clockwise rotation= %.f lb in"%(Tb,T1)
print "\nWhen dimensions are measured from fig 171(a)\nFor clockwise rotation= %.f lb in"\
"\nFor counter clockwise rotation= %.f lb"%(T2,T3)
import math
#Variable declaration
u=.35
Tb=500#lb.ft
rd=10#in
#Calculations
phi=math.atan(u)
x=rd*math.sin(phi)
#F*OD=R*a=R1*a
#R=R1
#2*R*x=Tb
OD=24#in
a=11.5#inches; From figure
F=Tb*a*12/(OD*2*x)
#from figure
HG=4#in
GK=12#in
HL=12.22#in
P=F*HG/GK
Fhd=HL*P/HG
#Results
print "a) Magnitude of P = %.f lb"%P
print "b) Magnitude of Fhd = %.f lb"%Fhd
import math
#Variable declaration
u=.3
theta=270*math.pi/180
l=18#in
a=4#in
Di=15#in
Do=21#in
w=.5#tons
#Calculations
W=w*2204#lb
Q=W*Di/Do#required tangential braking force on the drum
k=math.e**(u*theta)#k=T1/T2
p=Q*a/(l*(k-1))
#Result
print "Least force required, P = %.f lb"%p
import math
#Variable declaration
n=12
u=.28
a=4.5#in
b=1#in
l=21#in
r=15#in
Tb=4000#lb
#Calculations
theta=10*math.pi/180
#k=Tn/To
k=((1+u*math.tan(theta))/(1-u*math.tan(theta)))**n
Q=Tb*(12./r)
P=Q*(a-b*k)/(l*(k-1))#from combining 8.6 with k=e^u*theta
#Result
print "The least effort required = P = %.1f lb"%P
#Variable declaration
w=9.5 #ft
h= 2. #ft
x=4. #ft
v=30.#mph
#Calculations
V=1.46667*v#ft/s
u1=.1
u2=.6
g=32.2#ft/s**2
#a) rear wheels braked
fa1=(u1*(w-x)*g)/(w+u1*h)
fa2=(u2*(w-x)*g)/(w+u2*h)
sa1=V**2/(2*fa1)
sa2=V**2/(2*fa2)
#b) front wheels braked
fb1=u1*x*g/(w-u1*h)
fb2=u2*x*g/(w-u2*h)
sb1=V**2/(2*fb1)
sb2=V**2/(2*fb2)
#c) All wheels braked
fc1=u1*g
fc2=u2*g
sc1=V**2/(2*fc1)
sc2=V**2/(2*fc2)
k1=(x+u1*h)/(w-x-u1*h)#Na/Nb
k2=(x+u2*h)/(w-x-u2*h)#Na/Nb
#Results
print "Coefficient of friction = 0.1\na) Minimum distance in which car may be stopped when the rear brakes are"\
"applied = %.f ft\nb) Minimum distance in which car may be stopped when the front brakes are applied = %.f ft"\
"\nc) Minimum distance in which car may be stopped when all brakes are applied = %.f ft"%(sa1,sb1,sc1)
print "\nCoefficient of friction = 0.6\na) Minimum distance in which car may be stopped when the rear brakes are "\
"applied = %.1f ft\nb) Minimum distance in which car may be stopped when the front brakes are applied = %.f ft"\
"\nc) Minimum distance in which car may be stopped when all brakes are applied = %.1f ft"%(sa2,sb2,sc2)
print "\nRequired ration of Na/Nb\nFor u1 = 0.1 -> %.3f\nFor u2 = 0.6 -> %.2f"%(k1,k2)