#example 5.1, Page 90
import math
IL=(100*1000)/(math.sqrt(400*0.9*0.8*3))#Full load current
FS=(1000-950)/1000#Full load slip
x=[1,0.57736,0.7,0.333333333]
for i in range(0,4):
T=1.8*(x[i])**2
print'%s %.6f %s %.3f' %('The value of Tst/Tf when x=',x[i],'is=',T)
#end
#the answers are more accurate due to approximations in program than textbook answers
#example 5.2
#page no. 93
#calculate the time taken by a fan
tor=42.
speed=1425.
minertia=1.
area=155.#found from figure given in book
acctime=155*2*3.14*100*0.003*1/60.
print'%s %.2f %s' %('the acceleration time =',acctime,'secs')
#Example 5.3, page 97
import math
s=.05#slip
x=1#ie x1+x2
s_max=((1-s**2)/(2*math.log(1/s)))**(1./2.)#max slip
#disp(s_max)
R2_opt=x*s_max
ws=(2*math.pi*1000)/60#angular frequency
v1=400/math.sqrt(3.)#voltage
j=10#angular V
Tmax=(3*v1**2)/(ws*2.*x)
Tmin=((j*ws)/(2.*Tmax))*(((1-s**2)/(2*R2_opt))+((R2_opt*math.log(1/s))))
print'%s %.3f %s' %('The value of T_min is =',Tmin,'sec ')
#Example 5.4, Page no 102
import math
p=400*20*.88*math.sqrt(3)#input power in watt
l=12193.6-10000#in watt, full load loss
e=l*60#energy lost per minute
ws=(2*math.pi*1000)/60.#angular frequency
j=.5
R=1#resistance in ohm ir R1/R2
El=(0.5*j*ws**2)*(1+R)
#disp(El)
N=e/El
#disp(N)
print'%s %d' %("The number of starts that can be made is =",N)
ws=(2*math.pi*1500)/60.#angular frequency
j=.5
R=1#resistance in ohm ir R1/R2
El=(0.5*j*ws**2.)*(1.+R)
#disp(El)
N=e/El
#disp(N)
print'%s %.2f %s' %("The number of permissible starts is =",N,'say 10')