import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-16.1 Page No.358\n');
##Torque capacity
f=0.3;
N=120.;
ro=12.;
ri=9.;
Tf=f*N*(ro+ri)/2.;
print'%s %.2f %s '%('\n Torque capacity = ',Tf,' in-lb.');
n=2000.;
##Power
Pf=Tf*n/63000.;
print'%s %.2f %s '%('\n Power = ',Pf,' hp.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-16.2 Page No.359\n');
##Normal force
W=100.;
L=20.;
a=4.;
N=(W*L)/a;
print'%s %.2f %s '%('\n Normal force = ',N,' lb.');
##Torque friction
f=0.4;
D=12.;
Tf=f*N*D/2.;
print'%s %.2f %s '%('\n Torque friction = ',Tf,' in-lb.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-16.3 Page No.360\n');
##For alpha=20 deg.
alpha=20.*(math.pi/180.);
f=0.35;
rm=12./2.;
Fa=75.;
Tf=(f*rm*Fa)/(math.sin(alpha)+f*math.cos(alpha));
print'%s %.2f %s '%('\n Torque capacity (alpha=20 deg.) = ',Tf,' in-lb.');
##For alpha=10 deg.
alpha=10.*(math.pi/180.);
Tf=(f*rm*Fa)/(math.sin(alpha)+f*math.cos(alpha));
print'%s %.2f %s '%('\n Torque capacity (alpha=10 deg.) = ',Tf,' in-lb.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-16.4 Page No.361\n');
##Stopping rate
V=60.*5280./3600.;
Va=0.5*V;
D=400.;
t=D/Va;
a=V/t;
print'%s %.2f %s '%('\n Stopping rate = ',a,' ft/sec^2.');
##Stopping force
W=40000.;
g=32.2;
F=W*a/g;
##Torque
r=36./2.;
T=F*r;
print'%s %.2f %s '%('\n Torque = ',T,' in-lb.');
##For each wheel
T=T/10.;
##Braking normal force
rm=10.;
f=0.4;
N=T/(f*rm);
print'%s %.2f %s '%('\n Braking normal force = ',N,' lb.');
##Note-There is an error in the answer given in textbook
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-16.5 Page No.365\n');
W=3500.;
V=73.;
g=32.2;
V=50.*5280./3600.;
V=round(V);
##Kinetic energy to be absorbed
KE=W*V**2/(2.*g);
print'%s %.2f %s '%('\n Kinetic energy to be absorbed = ',KE,' ft-lb.');
##Temperature rise
Uf=KE;
Wb=40.;
c=93.;
deltaT=Uf/(Wb*c);
print'%s %.2f %s '%('\n Temperature rise = ',deltaT,' deg.');
##Stopping time
a=20.;
t=V/a;
print'%s %.2f %s '%('\n Stopping time = ',t,' sec.');
##Frictional power
t=round(t*10.)/10.;
fhp=Uf/(550.*t);
print'%s %.2f %s '%('\n Frictional power = ',fhp,' hp.')