import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.1 Page No.280\n');
##Pitch-line velocity
Nt=24.;
Pd=12.;
Dp=Nt/Pd;
n=1750.;
Vm=math.pi*Dp*n/12.;
print'%s %.2f %s '%('\n Pitch-line velocity = ',Vm,' ft/min.');
##Transmitted force
hp=5.;
Ft=33000.*hp/Vm;
print'%s %.2f %s '%('\n Transmitted force = ',Ft,' lb.');
##Axial force
psi=15.*math.pi/180.;
Fa=Ft*math.tan(psi);
print'%s %.2f %s '%('\n Axial force = ',Fa,' lb.');
##Separating force
theta=20.*math.pi/180.;
psit=math.atan(math.tan(theta)/math.cos(psi));
Fn=Ft*math.tan(psit);
print'%s %.2f %s '%('\n Separating force = ',Fn,' lb.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.2 Page No.282\n');
##Normal plane pitch
Pd=16.;
psi=45.*math.pi/180;
Pdn=Pd/math.cos(psi);
print'%s %.2f %s '%('\n Normal plane pitch =',Pdn,' in.');
N=24.;
S=30000.;
b=0.5;
Ne=N/math.cos(psi)**3;
Y=0.427;
Fs=S*b*Y/Pdn;
print'%s %.2f %s '%('\n Allowable force = ',Fs,' lb.');
Dp=24./16.;
n=600.;
Vm=math.pi*Dp*n/12.;
print'%s %.2f %s '%('\n Surface speed = ',Vm,' ft/min.');
Ft=Fs/((600.+Vm)/600.);
print'%s %.2f %s '%('\n Force transmitted = ',Ft,' lb.');
P=Ft*Vm/33000.;
print'%s %.2f %s '%('\n Power rating = ',P,' hp.');
##Note-There is an error in the answer given in textbook
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.3 Page No.286\n');
Np=24.;
Ng=36.;
Pd=8.;
Yp=33.7*math.pi/180.;
Yg=56.3*math.pi/180.;
theta=14.5*math.pi/180.;
##Pitch diameter
Dp=Np/Pd;
print'%s %.2f %s '%('\n Pitch diameter = ',Dp,' in.');
##Transmitted force
n=2200.;
P=8.;
T=63000.*P/n;
Ft=2.*T/Dp;
print'%s %.2f %s '%('\n Transmitted force = ',Ft,' lb.');
##Separating force - Pinion
Fnp=Ft*math.tan(theta)*math.cos(Yp);
print'%s %.2f %s '%('\n Separating force-Pinion = ',Fnp,' lb.');
##Separating force-Gear
Fng=Ft*math.tan(theta)*math.cos(Yg);
print'%s %.2f %s '%('\n Separating force = ',Fng,' lb.');
##Axial force-Pinion
Fap=Ft*math.tan(theta)*math.sin(Yp);
print'%s %.2f %s '%('\n Axial force-Pinion= ',Fap,' lb.');
##Axial force-Gear
Fag=Ft*math.tan(theta)*math.sin(Yg);
print'%s %.2f %s '%('\n Axial force-Gear = ',Fag,' lb.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.4 Page No.288\n');
##Pitch diameter
Ng=60.;
Pd=6.;
Dp=Ng/Pd;
print'%s %.2f %s '%('\n Pitch diameter = ',Dp,' in.');
##Circular pitch
Pc=math.pi*Dp/Ng;
print'%s %.2f %s '%('\n Circular pitch = ',Pc,' in.');
L=Pc;
##Lead angle
D=2.;
LA=math.atan(L/(math.pi*D));
LA=LA*180./math.pi;
print'%s %.2f %s '%('\n Lead angle = ',LA,' deg.');
##Centerline distance
CC=(D+Dp)/2.;
print'%s %.2f %s '%('\n Centerline distance = ',CC,' in.');
##Velocity ratio
Ntgear=60.;
Nstarts_worm=1.;
Vr=Ntgear/Nstarts_worm;
print'%s %.2f %s '%('\n Velocity ratio = ',Vr,'');
##Output speed
nin=1750.;
nout=nin/Vr;
print'%s %.2f %s '%('\n Output speed = ',nout,' rpm.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.5 Page No.292\n');
##Normal circular pitch
Pc=0.524;
LA=4.77*math.pi/180.;
Pcn=Pc*math.cos(LA);
print'%s %.2f %s '%('\n Normal circular pitch = ',Pcn,'in.');
##Force transmitted
hp=5.;
n=29.2;
T=63000.*hp/n;
Dp=10.;
Ft=2.*T/Dp;
print'%s %.2f %s '%('\n Force transmitted = ',Ft,' lb.');
Vm=math.pi*Dp*n/12.;
##Dynamic load
Fd=(1200.+Vm)*Ft/1200.;
print'%s %.2f %s '%('\n Dynamic load = ',Fd,' lb.');
##Force allowable
Su=95.*10**3;
Y=0.392;
b=1.;
Sn=0.5*Su;
Fs=Sn*Y*b*Pcn/math.pi;
print'%s %.2f %s '%('\n Force allowable = ',Fs,' lb.');
##Safty factor
Nsf=Fs/Fd;
print'%s %.2f %s '%('\n Safty factor = ',Nsf,'');
##Note-There is an error in the answer given in textbook
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.6 Page No.294\n');
##Efficiency
LA=4.77*math.pi/180.;
f=0.03;
e=math.tan(LA)*(1-f*math.tan(LA))/(f+math.tan(LA));
print'%s %.2f %s '%('\n Efficiency = ',e,'');
##Torque input
hp=5.;
n=1750.;
T=63000.*hp/n;
print'%s %.2f %s '%('\n Torque input = ',T,' in-lb.');
Vr=60.;
Tout=0.73*Vr*T;
print'%s %.2f %s '%('\n Output torque = ',Tout,' in-lb.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.7 Page No.296\n');
hpin=5.
e=0.73;
Q=(1.-e)*hpin*2544.;
print'%s %.2f %s '%('\n Heat generated by system = ',Q,' Btu/hr.');
##Note-There is an error in the answer given in textbook