from __future__ import division
from math import sqrt, pi, asin, degrees, exp
P1=12*10**3#
d=0.3#
D=0.9#
C=0.9#
A=230*10**-6#
#density is rho
rho=1100#
N=1500#
#Maximum stress is sig
sig=2.1*10**6#
#semi groove angle is b
b=20*pi/180#
u=0.22#
m=rho*A#
v=2*pi*N*d/(60*2)#
Tc=m*v**2#
T1=A*sig#
#wrap angle is thetaA
ang=(D-d)/(2*C)#
thetaA=pi/180*(180-(2*degrees(asin(ang))))
thetaB=((2*pi)-thetaA)#
x=u*thetaB#
T2=Tc+((T1-Tc)/exp(x))#
P2=(T1-T2)*v#
n=P1/P2#
n=3# #(rounding off to nearest whole number)
print "Tc is %0.1f N "%(Tc)#
print "\nT1 is %0.0f N "%(T1)#
print "\nT2 is %0.1f N "%(T2)#
print "\nP2 is %0.0f W "%(P2)#
print "\nn is %0.0f "%(n)#
from math import sqrt, pi, asin, degrees, exp,sin
D=0.6#
d=0.3#
C=0.9#
m=0.193#
n=2#
N=1500#
u=0.3#
v=2*pi*N/60*d/2#
P=150*10**3#
Tc=m*v**2#
#let T1-T2=T
T=P/(n*v)#
thetaA=pi/180*(180-(2*degrees(asin((D-d)/(2*C)))))#
thetaB=((2*pi)-thetaA)#
#Groove angle=b
b=17.5*pi/180#
x=u*thetaA/sin(b)#
y=exp(x)#
c=(Tc*(1-y))#
T2=(T+(Tc*(1-y)))/(y-1)#
#T2=(T-y)/Tc#
T1=T+Tc#
Lp=2*sqrt((C**2)-((D-d)/2)**2)+(thetaA*d/2)+(thetaB*D/2)#
v=sqrt(T/(3*m))#
print "Tc is %0.2f N "%(Tc)#
print "\nT1 is %0.0f N "%(T1)#
print "\nT2 is %0.2f N "%(T2)#
print "\nLp is %0.3f m "%(Lp)#
print "\nv is %0.2f m/s "%(v)#
print "\nThe designation of the belt is B-3251-45 "#
#The difference in values of T1 and T2 is due to rounding-off of values.
from math import sqrt, pi, asin, degrees, exp,tan
C=1#
m=0.35#
d=0.25#
P=22*10**3#
#Let the smaller pulley dia be n
#Let the larger pulley dia be N
n=1000#
N=400#
D=d*n/N#
v=2*pi*n*d/(60*2)#
Tc=m*v**2#
topwidth=22#
h=14#
bottomwidth=topwidth-(2*h*tan(20*pi/180))#
A=(topwidth+bottomwidth)/2*h#
#let allowable tension be Ta
Ta=2.2#
T1=A*Ta#
u=0.28#
thetaA=pi/180*(180-(2*degrees(asin((D-d)/(2*C)))))
thetaB=((2*pi)-thetaA)#
#Groove angle=b=19
b=19*pi/180#
x=u*thetaA/sin(b)#
T2=Tc+((T1-Tc)/exp(x))#
n=P/((T1-T2)*v)#
Lp=2*sqrt((C**2)-((D-d)/2)**2)+(thetaA*d/2)+(thetaB*D/2)#
print "Tc is %0.2f N "%(Tc)#
print "\nT1 is %0.1f N "%(T1)#
print "\nT2 is %0.1f N "%(T2)#
print "\nn is %0.1f "%(n)#
print "\nLp is %0.3f m "%(Lp)#
print "\nThe designation of the belt is C-3414-47 "#
# difference in value of Lp is due to rounding-off the values of thetaA and thetaB.
from math import sqrt, pi
P=12*10**3#
Ks=1.1#
Pd=12*10**3*Ks#
N=1440#
B=17#
t=11#
d=200#
i=3#
D=i*d#
C=1000#
# since angle of contact theta is very small
theta=(D-d)/C#
theta=theta*180/pi#
Kc=0.8#
Lp=(2*C)+(pi/2*(D+d))+(((D-d)**2)/(4*C))#
Li=Lp-45#
Ki=1.1#
#let number of v-belts required = n
#let the KW rating be KWR
KWR=5.23#
n=(P*Ks)/(KWR*Ks*Ki*10**3)#
n=3#
print "D is %0.1f mm "%(D)#
print "\nC is %0.1f mm "%(C)#
print "\nn is %0.3f "%(n)#
print "\nLi is %0.0f mm "%(Li)
from sympy import symbols, solve
from math import pi
N=800;
P=20;
i=2.5;
Ks=1.5; #(from table for 3-5 hrs/day)
Pd=P*Ks;
d=250;
D=i*d;
C=1.6*D;
Lp=(2*C)+(pi*(D+d)/2)+((D-d)**2)/(4*C);
Li=Lp+74;
Listd=3454;
Lp=Listd+74;
p=[1, -1.0768, 0.0175];
P = symbols('P')
expr = P**2*p[0]+P*p[1]+p[2]
z = solve(expr, P)[1]
KW=9.4;
Kc=0.795;
K1=1;
n=Pd/(KW*Kc*K1);
print " C is %0.4f m "%(z)
print "\n Pd is %0.0f KW "%(Pd)
print "\n n is %0.2f KW "%(n)