from __future__ import division
from math import sqrt, pi, sin, cos, tan, atan
Zp=20#
Zg=50#
alphan=20*pi/180#
phi=15*pi/180#
mn=4#
m=mn/cos(phi)#
alpha=180/pi*atan(tan(alphan)/(cos(phi)))#
dp=Zp*m#
dg=Zg*m#
ha=4#
hd=1.25*mn#
#Let addendum circle dia of pinion be Pa
Pa=dp+(2*mn)#
#Let dedendum circle dia of pinion be Pd
Pd=dp-(2.5*mn)#
#Let addendum circle dia of gear be Ga
Ga=dg+(2*mn)#
#Let dedendum circle dia of gear be Gd
Gd=dg-(2.5*mn)#
b=pi*mn/sin(phi)#
print "m is %0.2f mm "%(m)#
print "\nalpha is %0.3f deg "%(alpha)#
print "\nPa is %0.1f mm "%(Pa)#
print "\nPd is %0.1f mm "%(Pd)#
print "\nGa is %0.0f mm "%(Ga)#
print "\nGd is %0.0f mm "%(Gd)#
print "\nb is %0.2f mm "%(b)#
from math import pi, sin, cos, tan
P=5000#
Zp=25#
Zg=50#
mn=4#
alphan=20*pi/180#
phi=20*pi/180#
N=1200#
m=mn/cos(phi)#
dp=Zp*m#
dg=Zg*m#
v=2*pi*N*dp/(60*2*1000)#
Pt=P/v#
Pa=Pt*tan(phi)#
Pr=Pt*tan(alphan)/cos(phi)#
print "Pt is %0.2f N "%(Pt)#
print "\nPa is %0.1f N "%(Pa)#
print "\nPr is %0.2f N "%(Pr)#
from math import sqrt, pi, sin, cos, tan
Zp=24#
Zg=72#
alphan=20*pi/180#
phi=24*pi/180#
N=720#
mn=5#
b=50#
sigut=600#
BHN=360#
Cs=1.4#
FOS=2#
sigb=sigut/3#
dp=mn*Zp/cos(phi)#
Zp=Zp/(cos(phi))**3#
Zg=Zg/(cos(phi))**3#
Y=0.358+((0.364-0.358)*1.48/2)#
Sb=b*mn*sigb*Y#
Q=(2*Zg)/(Zp+Zg)#
K=0.16*(BHN/100)**2#
Sw=b*dp*Q*K/(cos(phi)**2)#
v=2*pi*N*dp/(60*2*1000)#
Cv=5.6/(5.6+sqrt(v))#
Peff=Sb/FOS#
Pt=Peff*Cv/Cs#
P=Pt*v#
P=P*10**-3#
print "P is %0.3f kW "%(P)#
#The difference in the value is due to rounding-off of the values.
from math import sqrt, pi, sin, cos, tan, atan
Zp=25#
Zg=100#
P=5000#
N=2000#
alphan=20*pi/180#
phi=15*pi/180#
sigut=660#
Cs=1.5#
FOS=1.8#
v=10#
Zp1=Zp/(cos(phi))**3#
Zg1=Zg/(cos(phi))**3#
Y=0.348+(0.74*0.004)#
sigb=sigut/3#
Cv=5.6/(5.6+sqrt(v))#
#Sb=FOS*Peff
mn=FOS*P*Cs*60*1000*2*cos(phi)/(2*pi*N*Cv*Zp*12*sigb*Y)#
mn=mn**(1/3)#
mn=2.5#
dp=mn*Zp/cos(phi)#
Q=(2*Zg)/(Zp+Zg)#
b=12*mn#
Sb=12*sigb*Y#
K=Sb*(cos(phi)**2)/(dp*Q*b)#
BHN=sqrt(K/0.16)*100#
dg=mn*Zg/cos(phi)#
phip=mn+(0.25*sqrt(dp))#
ep=16+(1.25*phip)#
phig=mn+(0.25*sqrt(dg))#
eg=16+(1.25*phig)#
e=ep+eg#
e=e*10**-3#
r1=dp/2#
r2=dg/2#
Pd=e*N*Zp1*b*r1*r2/(2530*sqrt(r1**2+r2**2))#
v=2*pi*N*dp/(60*2*1000)#
#Let tangential component be TC
TC=(Cs*1845/mn)+(Pd*cos(alphan)*cos(phi))#
Sb=b*mn*sigb*Y#
print "mn is %0.1f mm "%(mn)#
print "\nTC is %0.0f N "%(TC)#
print "\nSb is %0.1f N "%(Sb)#
#The difference in the value of Sb is due to rounding-off of t