import math
#case a
e=600
p=6
n=1500
z=200
a=2
#since e=(phy*n*p*z)/(60*a)
phy=(e*60*a)/(n*p*z)
print "phy=0.04"
#case b
phy=0.05
p=8
n=500
z=800
a=8
p=8
e=(phy*p*n*z)/(60*a)
print "e=",format(e,'.3f'),"V"
#case c
e=400
a=2
n=(e*60*a)/(phy*p*z)
print "n=",format(n,'.1f'),"rpm"
#case d
phy=0.05
p=4
n=800
z=600
a=4
p=4
e=(phy*n*p*z)/(60*a)
print "e=",format(e,'.2f'),"V"
import math
d=0.2
l=0.25
p=6
z=250
bav=0.9
n=800
a=2
ld=50
phy=0.045 #flux per pole=0.9*0.2*0.25
e=(phy*p*n*z)/(60*a)
ia=e/ld
#case a
t=(60*e*ia)/(2*3.14*n)
print "torque=",format(t,'.2f'),"Nm"
#case b
po=e*ia
print "power output=",format(po,'.2f'),"W"
import math
#case a
ia=125 #armature current
ra=0.15
v=200
e=v+ia*ra
print "e=",format(e,'.2f'),"V"
#case b
n=500
t=(60*e*ia)/(2*3.14*n)
print "the developer generated torque=",format(t,'.2f'),"Nm"
#case c
pi=(e*ia)+((ia**2)*ra)
print "power input=",format(pi,'.2f'),"W"
#case d
e=183.75 #voltage generated at 420 rpm
ia=108.33 #since generated voltage is less than bus voltage the generator draws current from bus and functions as motor
#therefore,ia is the current when generator is functioning as motor
powip=v*ia
print "power input=",format(powip,'.2f'),"W"
powop=(e*ia)-((ia**2)*ra)
print "power output=",format(powop,'.2f'),"W"
import math
#given
i=250
v=125
rl=v/i #load resistance
gemf=125+200*0.05+1.5
print "generated emf=",format(gemf,'.2f'),"V"
e=(136.5*1200)/1500 #generated emf at 1200rpm
#let v be the terminal voltage at 1200rpm
#then armature current ia=v/rl
#substituting all values in v=e-ia*ra-(voltage drop across the brushes)=97.91
v=97.91
i=v*2 #where rl=0.5 in the denominator is written as 2
print "current=",format(i,'.2f'),"A"
import math
#given
#the external characteristic of the generator,the combined armature and series field resistance is given by ra+rs
r=0.375 #ra+rs
#case a
i=150
#-0.375+0.4=0.025 the voltage drop
vab=0.025*150
print "when i=150 the voltage drop between points a and b is=",format(vab,'.2f'),"V"
vab=0.025*45
print "when i=45 the voltage drop between points a and b is=",format(vab,'.2f'),"V"
import math
#given
v=250
e=230
ia=250
If=2.5
il=247.5
#case a
po=v*il
print "power input=",format(po,'.2f'),"W"
#case b
n=800
t=(60*e*il)/(2*3.14*n)
print "The input torque=",format(t,'.2f'),"Nm"
import math
#shunt field current
ish=400/220 #from circuit diagram
#armature current
i=50
ia=i+ish
print "armature current=",format(ia,'.2f'),"A"
#armature voltage
voldrop=3
ra=0.04
rs=0.02
v=400
e=v+ia*(ra+rs)+voldrop
print "armature voltage=",format(e,'.2f'),"V"
import math
#given
i=35
v=220
ra=0.15
n1=1600
#when motor is running at 1200rpm the back emf eb1 is given by eb1=v-(35*0.15)
eb1=214.75
#flux phy1 is proportional to armature current ia.Thus, at ia1=35 and ia2=15 n is proportional to eb/phy
#2=(eb2*phy1)/(phy2*eb1)
#therefore
eb2=184.07
#case a
#resistance to be connected in series is rse ohm
ia2=15
rse=((v-eb2)/ia2)-ra
print "rse=",format(rse,'.2f'),"ohm"
#case b
eb2=0.5*1.15*214.75
ia2=50
rse=((v-eb2)/ia2)-ra
phy1=35
eb2=220-50*0.15
n2=(n1*eb2*phy1)/(1.15*phy1*eb1)
print "n2=",format(n2,'.1f'),"rpm"
import math
#case a
i=60
eb1=450
ia=15.18 #derived from problem
#using formula n2/n1=(eb2*phy1)/(eb1*phy2)
eb2=45.54
rse=(eb1-eb2)/ia
print "rse=",format(rse,'.2f'),"ohm"
#case b
ia=38.97 #derived
#using the above used formula
eb2=219.21
rse=(eb1-eb2)/ia
print "rse=",format(rse,'.2f'),"ohm"
import math
#given and derived from the circuit in the figure
ish=2
ia=77 #75+2
ra=0.15
v=200
e=v+ia*ra
#when dc machine runs as a motor
ia=73 #75-2
eb=v-(ia*ra)
#n1 and n2 are the speeds at which the motor is operating as a generator and motor
n1=211.55
n2=189.05
p=n1/n2
print p
import math
#given
n=500
v=250
rsh=80
ra=0.02
drop=1.5
#derived
ish=3.125 #ish=v/rsh
il=480 #il=w*1000/v
ia=483.125 #ia=il+ish
e=v+ra*ia+2*drop
il=80
ia=il-ish
eb=v-ra*ia-2*drop
n=(500*eb)/e #e is proportional to n
print "n=",format(n,'.2f'),"rpm"
import math
#given and derived
ish=1
il=26
ia=25
ra=0.4
#phy1*i1=phy2*i2 and ish2*i2=ish1*i1
#subtituting values in the above equation we get i2=25/ish2
eb1=200-ia*ra
#eb2=200-0.4*i2
#eb1/eb2=(n1*ish1)/(n2*ish2)
#190/(200-0.4*25/ish2)=500/(700*ish2)
#on finding the square root we get the value of ish2 as 0.698A
ish2=0.698
totres=200/0.698
r=totres-200
print "resistance to be inserted in the field circuit is=",format(r,'.2f'),"ohm"
import math
#given and derived
phy=0.015
p=8
z=1000
a=2
ra=0.4
rsh=200
v=400
ish=2
ia=25-2
eb=400-25*0.4
il=25
n=(eb*60*a)/(phy*p*z)
t=(phy*p*z*ia)/(2*3.14*2)
powdev=eb*ia
netshaft=powdev-1000 #aggregate losses
torque=(netshaft*60)/(2*3.14*n)
hp=netshaft/746
powinput=v*il
n=netshaft/powinput
print n
import math
#given and derived
v=450
r=0.25
i1=160
i2=125
r1=450/float(160)
eb1=v-i2*r1
#flux decreases by 12% hence eb2=1.12*eb1
eb2=110.60
r2=(v-eb2)/i1
eb3=v-i2*r2
eb4=1.12*eb3
r3=(v-eb4)/i1
eb5=v-i2*r3eb6=1.12*eb5
r4=(450-eb6)/i1
eb7=v-i2*r4
eb8=1.12*eb7
r5=(v-eb8)/i1
#resistance of each section of the starter is determined as follows
R1=r1-r2
print "R1=",format(R1,'.2f'),"ohm"
R2=r2-r3
print "R2=",format(R2,'.2f'),"ohm"
R3=r3-r4
print "R3=",format(R3,'.2f'),"ohm"
R4=r4-r5
print "R4=",format(R4,'.2f'),"ohm"
R5=r5-r
print "R5=",format(R5,'.2f'),"ohm"
import math
#given and derived
If=1.6
ia=300
loss=640 #400*1.6
pconst=4140 #sum of core,field and friction losses
ra=0.08
ia=301.6
arloss=7277 #armature loss at full load
#case a
po=120*1000
n=(po/float(po+arloss+pconst))*100
print n
arlosshalfload=150+1.6 #il/2+if
arlossfullload=1838.6 #ia**2*ra
#case b
n=((60*1000)/((60*1000)+1838.6+4140))*100
print n
#for maximum n ia=il
ia=(pconst/ra)**0.5
nmax=((120*1000)/float((120*1000)+2*4140))*100
print nmax
maxn=(ia*100)/300
print maxn