from math import sqrt, pi, atan, sin, tan, cos
from __future__ import division
P=8000#
N1=400#
N2=200#
i=N1/N2# #i=Zg/Zp=dg/dp
gamma1=atan(1/i)#
gamma2=90-gamma1#
rp=200#
R=rp/sin(gamma1)#
b=0.2*R#
rm1=rp-(b*sin(gamma1)/2)#
Pt=P*1000*60/(2*pi*N1*rm1)#
alpha=20*pi/180#
Ps=Pt*tan(alpha)#
Pr=Ps*cos(gamma1)#
Pa=Ps*sin(gamma1)#
print "Pt is %0.0f N "%(Pt)#
print "\nPs is %0.2f N "%(Ps)#
print "\nPr is %0.2f N "%(Pr)#
print "\nPa is %0.2f N "%(Pa)#
#The difference in the values is due to rounding-off of the values.
from math import sqrt, pi, atan, sin, tan, cos
alpha=20*pi/180#
Zp=20#
Zg=36#
m=4#
sigut=600#
b=25#
dp=m*Zp#
rp=dp/2#
dg=m*Zg#
rg=dg/2#
gamma1=atan(rp/rg)#
Zpv=Zp/cos(gamma1)#
Y=0.33+0.003*0.88#
sigb=sigut/3#
Sb=m*b*sigb*Y#
print "Zpv is %0.2f "%(Zpv)#
print "\nSb is %0.0f N "%(Sb)#
from math import sqrt, pi, atan, sin, tan, cos,asin
m=6#
Zp=30#
Zg=45#
dp=m*Zp#
rp=dp/2#
dg=m*Zg#
rg=dg/2#
R=sqrt(rg**2+rp**2)#
gamma1=180/pi*asin(rp/R)#
gamma2=(90-gamma1)#
ha=6#
hf=1.25*ha#
phi=180/pi*atan(ha/R)#
beta=180/pi*atan(hf/R)#
#let Face Cone Angle be FCA
FCA=(gamma1+phi)#
#Let Root cone angle be RCA
RCA=(gamma1-beta)#
print "gamma1 is %0.1f deg "%(gamma1)#
print "\ngamma2 is %0.1f deg "%(gamma2)#
print "\nR is %0.2f mm "%(R)#
print "\nFCA is %0.3f deg "%(FCA)#
print "\nRCA is %0.2f deg "%(RCA)#
from math import sqrt, pi, atan, sin, tan, cos
alpha=20*pi/180#
Zp=25#
Zg=40#
m=5#
b=30#
BHN=400#
dp=m*Zp#
rp=dp/2#
dg=m*Zg#
rg=dg/2#
gamma1=atan(rp/rg)#
gamma1=180/pi*gamma1#
gamma2=(90-gamma1)#
a=cos(pi/180*gamma2)#
Zp1=Zp/cos(gamma1)#
Zg1=Zg/a#
Q=(2*Zg1)/(Zp1+Zg1)#
K=0.16*(BHN/100)**2#
Sw=0.75*b*dp*Q*K/cos(pi/180*gamma1)#
print "Sw is %0.1f N "%(Sw)#
#The difference in the value of Sw is due to rounding-off of the value of Q.
from math import sqrt, pi, atan, sin, tan, cos
Zp=20#
Zg=36#
m=4#
b=25#
BHN=360#
Np=750#
FOS=1.75#
dp=m*Zp#
rp=dp/2#
dg=m*Zg#
rg=dg/2#
gamma1=atan(dp/dg)#
gamma1=180/pi*gamma1#
gamma2=(90-gamma1)#
a=cos(pi/180*gamma2)#
Zp1=Zp/cos(pi/180*gamma1)#
Zg1=Zg/a#
Q=(2*Zg1)/(Zp1+Zg1)#
K=0.16*(BHN/100)**2#
R=sqrt(rp**2+rg**2)#
Y=0.33+0.003*0.86#
sigut=600#
sigb=sigut/3#
Sb=m*b*Y*sigb*(1-(b/R))#
Sw=0.75*b*dp*Q*K/cos(pi/180*gamma1)#
print "Sb is %0.0f N "%(Sb)#
print "\nSw is %0.1f N "%(Sw)#
#The answwer to Sb is calculated incorrectly in the book.
from math import sqrt, pi, atan, sin, tan, cos
Dp=300#
rp=150#
#Let the angular velocity ratio be i
i=2/3#
rg=rp/i#
Dg=2*rg#
R=sqrt(rp**2+rg**2)#
P=15000#
N=300#
Cs=1.5#
FOS=2#
sigb=100#
gamma1=atan(Dp/Dg)#
gamma1=180/pi*gamma1#
gamma2=(90-gamma1)#
v=2*pi*N*rp/(60*1000)#
Cv=5.6/(5.6+sqrt(v))#
Pt=P/v#
Peff=Pt*Cs/Cv#
Sb=Peff*FOS#
b=R/4#
#let x=m*Y
x=Sb/(b*sigb*(1-(b/R)))#
m=6#
print "m*Y is %0.3f mm**2 "%(x)#
print "\nm is %0.0f mm "%(m)#
from math import sqrt, pi, atan, sin, tan, cos
Zp=24#
Zg=36#
N=1400#
P=11600#
Cs=1.4#
FOS=2#
sigut=600#
sigb=sigut/3#
gamma1=atan(Zp/Zg)#
gamma1=180/pi*gamma1#
gamma2=(90-gamma1)#
a=cos(pi/180*gamma2)#
Zp1=Zp/cos(pi/180*gamma1)#
Zg1=Zg/a#
Q=(2*Zg1)/(Zp1+Zg1)#
v=1.76#
Pt=P/v#
Cv=5.6/(5.6+sqrt(v))#
Peff=Pt*Cs/Cv#
x=Peff*FOS#
Y=0.352+(0.003*0.85)#
y=2*sigb*Y*(1-(6/21.63))#
m=sqrt(x/y)#
# Design is safe for m=4
m=4#
b=6*m#
dp=24*m#
rp=48#
dp=dp/cos(pi/180*gamma1)#
v=2*pi*N*rp/(60*1000)#
Cv=5.6/(5.6+sqrt(v))#
Sb=y*m**2#
#Sw=Sb#
K=Sb/(0.75*b*dp*Q)#
BHN=sqrt(K/0.16)*100#
print "m is %0.0f mm "%(m)#
print "\nBHN is %0.0f "%(BHN)#
#The answwer to BHN is calculated incorrectly in the book.
from math import sqrt, pi, atan, sin, tan, cos
Zp=40#
Zg=60#
P=3500#
N=600#
Cs=1.5#
sigb=55#
gamma1=atan(Zp/Zg)#
gamma1=180/pi*gamma1#
gamma2=(90-gamma1)#
a=cos(pi/180*gamma2)#
Zp1=Zp/cos(pi/180*gamma1)#
Zg1=Zg/a#
Q=(2*Zg1)/(Zp1+Zg1)#
# Design is safe for m=6
m=6#
b=6*m#
dp=Zp*m#
rp=dp/2#
dg=Zg*m#
rg=dg/2#
R=sqrt(rp**2+rg**2)#
print "m is %0.0f mm "%(m)#
print "\nb is %0.0f mm "%(b)#
print "\nR is %0.0f mm "%(R)#