import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.1 Page No.217\n');
N2=60.;
N1=20.;
N3=20.;
N4=60.;
Vr=(N2/N1)*(N4/N3);
##Output speed
n1=3600.;
n4=n1/Vr;
print'%s %.2f %s '%('\n The output speed is ',n4,' rpm.');
##Output torque
T1=200.;
T4=T1*Vr;
print'%s %.2f %s '%('\n The output torque is ',T4,' lb*in.');
##Input horsepower
hpi=T1*n1/63000.;
print'%s %.2f %s '%('\n The input horsepower is ',hpi,' hp.');
##Output horsepower
hpo=T4*n4/63000.;
print'%s %.2f %s '%('\n The output horsepower is ',hpo,' hp.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.2 Page No.219\n');
Na=20.;
Nb=65.;
Nc=20.;
Nd=22.;
Ne=60.;
##train value
Vr=(Nb/Na)*(Nd/Nc)*(Ne/Nd);
print'%s %.2f %s '%('\n Train value = ',Vr,'');
##Output speed
na=3000.;
ne=na/Vr;
print'%s %.2f %s '%('\n \Output speed = ',ne,' rpm.');
##Output torque
Ta=10.;
Te=Ta*Vr;
print'%s %.2f %s '%('\n Output torque = ',Te,' lb*in.');
##Direction
print('\n Direction\n If Gear A is clockwise,\n Gear B is counterclockwise.\n Gear C is counterclockwise.\n Gear D is clockwise. \n Gear E is counterclockwise.');
##Output power
P=Te*ne;
P=P*math.pi/60;
print'%s %.2f %s '%('\n Output power = ',P,' W.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.3 Page No.231\n');
Np=16.;
Ng=32.;
Pd=8.;
##Pitch diameter
Dp=Np/Pd;
print'%s %.2f %s '%('\n Pinion pitch diameter is ',Dp,' in.');
Dg=Ng/Pd;
print'%s %.2f %s '%('\n Gear pitch diameter is ',Dg,' in.');
##Circular pitch
Pc=math.pi*Dp/Np;
print'%s %.2f %s '%('\n Circular pitch is ',Pc,' in.');
##Centerline distance
CC=(Dp+Dg)/2.;
print'%s %.2f %s '%('\n Centerline distance is ',CC,' in.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.4 Page No.236\n');
##Torque in input shaft
hp=1.5;
n=3450.;
T=63000.*hp/n;
print'%s %.2f %s '%('\n Torque in input shaft is ',T,' lb*in.');
##Note-In the book T=27.4 in-lb is used instead of T=27.391304
##Output torque
Ng=24.;
Np=10.;
Tout=(Ng/Np)*T;
print'%s %.2f %s '%('\n Output torque is ',Tout,' lb*in.');
##Output speed
nout=(Np/Ng)*n;
print'%s %.2f %s '%('\n Output speed is ',nout,' rpm.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.5 Page No.241\n');
##Gear train value
Na=12.;
Nb=36.;
Nc=16.;
Nd=64.;
Vr=(Nb/Na)*(Nd/Nc);
print'%s %.2f %s '%('\n Gear train value is ',Vr,'');
##Motor torque
hp=1.5;
n=1750.;
T=63000.*hp/n;
print'%s %.2f %s '%('\n Motor torque is ',T,' in-lb.');
##Output torque
Tout=T*Vr;
print'%s %.2f %s '%('\n Output torque is ',Tout,' in-lb.');
##Output speed
nout=n/Vr;
print'%s %.2f %s '%('\n Output speed is ',nout,' rpm.');
##Directions
print('\n Directions\n Gear A is clockwise.\n Gear B is counterclockwise.\n Gear C is counterclockwise.\n Gear D is clockwise.');
##Output power
hp=T*n/63000.;
print'%s %.2f %s '%('\n Output power is ',hp,' hp.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-11.6 Page No.243\n');
##Velocity ratio
N2=2400.;
N1=20.;
Vr=N2/N1;
print'%s %.2f %s '%('\n Velocity ratio = ',Vr,'');
print('\n Possible Solution: \n Three sets of gears \n -20 tooth and 80 tooth\n -20 tooth and 100 tooth\n -20 tooth and 120 tooth.');