#for 50kw generator
I_1=50*1000/500 # full load current in ampere
V_1=0.06*500 # full load voltage drop in volts
V_1pi=V_1/I_1 # voltage drop per ampere of current supply in volts/ampere
#for 100kw generator
I_2=100*1000/500 # full load current in ampere
V_2=0.04*500 # full load voltage drop in volts
V_2pi=V_2/I_2 # voltage drop per ampere of current supply in volts/ampere
i_1=250/(1+(V_1pi/V_2pi)) # amperes
i_2=250/(1+(V_2pi/V_1pi)) # amperes
print '(a) Current delievered in 50kw generator = %.2f amperes'%i_1
print ' Current delievered in 100kw generator = %.2f amperes'%i_2
V_t=500-V_1pi*i_1 # volts
print '(b) Terminal voltage = %.2f volts'%V_t
from math import sqrt
E_g1=120 # volts
E_g2=115 # volts
R_a1=0.05 # armature winding resistance of first generator = %.2f ohms)
R_a2=0.04 # armature winding resistance of second generator = %.2f ohms)
R_f1=20 # feild winding resistance of first generator = %.2f ohms)
R_f2=25 # feild winding resistance of seccond generator = %.2f ohms)
P=25000 # watts
V_t=(5275+sqrt((5275**2)-(4*45.09*25000)))/(2*45.09) # terminal voltage in volts
I_1=(E_g1-(V_t*(1+(R_a1/R_f1))))/R_a1 # amperes
I_2=(E_g2-(V_t*(1+(R_a2/R_f2))))/R_a2 # amperes
P_1=V_t*I_1/1000 # kilo watts
P_2=V_t*I_2/1000 # kilo watts
print 'Power shared by generator-1 = %.2f kilo Watts'%P_1
print 'Power shared by generator-2 = %.2f kilo Watts'%P_2
P=8 # no. of poles
A=8
Phy=40*10**-3 # flux in weber
N=500 # speed in rpm
E_g=250 # no-load voltage in volts
Z=(E_g*60*A)/(P*N*Phy)
print 'Number of conductors=',Z
V_t=300 # volts
V_b=1 # voltage drop per brush in volts
I=200 # amperes
R_f=200 # shunt feild winding resistance in ohms
R_a=0.05 # armature winding resistance in ohms
R_se=0.04 # Series feild winding resistance in ohms
I_f=V_t/R_f # amperes
I_a=I+I_f # amperes
E_g=V_t+(R_a+R_se)*I_a+(2*V_b)
print 'Value of generated voltage = %.2f volts'%E_g
print 'Value of armature current = %.2f Ampers'%I_a
V_t=250 # volts
I=195 # amperes
R_f=50 # shunt feild winding resistance in ohms
R_a=0.05 # armature winding resistance in ohms
I_f=V_t/R_f # amperes
I_a=I+I_f # amperes
E_g=V_t+(R_a*I_a)
R_L=V_t/I
print '(a) Value of shunt feild current = %.2f Amperes'%I_f
print '(b) Value of armature current = %.2f Amperes'%I_a
print '(c) Value of generated voltage = %.2f volts'%E_g
print '(d) Value of load resistance = %.2f ohms'%R_L
V_t=250 # volts
V_AC=V_t
V_b=1 # voltage drop per brush in volts
I=40 # amperes
R_f=100 # shunt feild winding resistance in ohms
R_a=0.05 # armature winding resistance in ohms
R_se=0.04 # series feild winding resistance in ohms
V_BC=V_AC+I*R_se # volts
I_f=V_BC/R_f # amperes
I_a=I+I_f # amperes
E_g=V_BC+(R_a*I_a)*(2*V_b)
print ' Value of armature current = %.2f Amperes'%I_a
print ' Value of generated voltage = %.2f volts'%E_g
P=8 # no. of poles
A=8
Z=760 # no.of conductors
Phy=35*10**-3 # flux in weber
N=500 # speed in rpm
E_g=(P*N*Phy*Z)/(60*A)
print 'Value of generated emf = %.2f volts'%E_g
from math import pi
P=8 # no. of poles
S=70 # no. of slots
C=22 # conductors per slot
A=8
D=0.48 # meter
Z=S*C # no.of conductors
r=0.64 # ratio of pole arc to pole pitch
l=0.28 # length of pole shoe in meter
B=0.32 # air gap flux density in weber/meter**2
E_g=400 # volts
Pole_arc=r*pi*D/P # meter
Ao=Pole_arc*l # Area of pole shoe in meter
Phy=Ao*B # weber
N=E_g*60*A/(Phy*Z*P)
print 'Speed of generator = %.2f rpm'%N
V_t=200 # volts
P=4 # no. of poles
A=2
Z=676 # no.of conductors
R_L=10 # load resistance in ohms
R_a=0.34 # armature winding resistance in ohms
R_f=100 # feild winding resistance in ohms
N=600 # speed in rpm
I_f=V_t/R_f # amperes
I=V_t/R_L # amperes
I_a=I+I_f
E_g=V_t+I_a*R_a
Phy=E_g*60*A/(P*N*Z)
print '(a) Armature current = %.2f amperes'%I_a
print '(b) Generated emf = %.2f volts'%E_g
print '(c) flux/pole = %.2f mili weber'%(Phy*1000)
V_t=250 # volts
P=6 # no. of poles
A=P
Z=700 # no.of conductors
R_a=0.04 # armature winding resistance in ohms
R_f=100 # feild winding resistance in ohms
N=1000 # speed in rpm
I_f=V_t/R_f # amperes
I_a=7.2/R_a # amperes
I=I_a-I_f # amperes
E_g=V_t+I_a*R_a
Phy=E_g*60*A/(P*N*Z)
print '(a) Load current = %.2f amperes'%I
print '(b) Generated emf = %.2f volts'%E_g
print '(c) flux/pole = %.2f mili weber'%(Phy*1000)
P_o=22000 # power in watts
V_t=220 # volts
V_b=1 # per brush drop in volts
P=4 # no. of poles
A=2
R_se=0.04 # series resistance in ohms
R_a=0.05 # armature winding resistance in ohms
R_f=110 # feild winding resistance in ohms
Phy=7.8*10**-3 # weber
N=1000 # speed in rpm
I=P_o/V_t # amperes
I_f=V_t/R_f # amperes
I_a=I+I_f
E_g=V_t+I_a*(R_a+R_se)+2*V_b
Z=E_g*60*A/(Phy*N*P)
print '(a) Armature current = %.2f amperes'%I_a
print '(b) Generated emf = %.2f volts'%E_g
print '(c) No. of conductors of armature= %.2f'%Z
P=6 # no. of poles
A=2
Z=350 # no. of conductors
R_a=0.8 # armature winding resistance in ohms
R_f=120 # feild winding resistance in ohms
Phy=0.02 # weber
N=1000 # speed in rpm
R_L=12 # load resistance in ohms
E_g=Phy*N*Z*P/(60*A) # emf induced in volts
V_t=E_g/(1+((1/R_f)+(1/R_L))*R_a)
I_L=V_t/R_L # amperes
P_o=V_t*I_L # watts
print 'Power absorbed by the load = %.2f watts'%P_o
P1=200*10**3 # initial load in watts
P2=125*10**3 # final load in watts
V_t=250 # volts
V_b=2 # total brush drop in volts
P=6 # no. of poles
R_a=0.015 # armature winding resistance in ohms
I_g1=P1/V_t # amperes
I_a1=I_g1 # amperes
E_g1=V_t+I_a1*R_a+V_b # volts
I_g2=P2/V_t # amperes
I_a2=I_g2 # amperes
E_g2=V_t+I_a2*R_a+V_b # volts
#since E_g is directly proportional to N
#therefore,E_g1/E_g2=N_1/N_2
r=E_g2/E_g1
reduction=(1-r)*100
print 'Percentage reduction in speed = %.2f %%'%reduction
from math import ceil
V_t=400 # volts
V_b=2 # total brush drop in volts
R_a=0.12 # armature winding resistance in ohms
N1=1000 # speed in rpm
I_a1=150 # amperes
I_a2=100 # amperes
R_L=V_t/I_a1 # load resistance in ohms
E_g1=V_t+I_a1*R_a+V_b # volts
V_to=R_L*I_a2 # volts
E_g2=ceil (V_to+I_a2*R_a+V_b) # volts
#Since E_g is directly proportional to N
#therefore,E_g1/E_g2=N1/N2
N2= N1*E_g2/E_g1 # rpm
print 'Speed = %.2f rpm'%(ceil(N2))
from math import pi
P_o=25000 # output power in watts
V_t=250 # volts
R_se=0.05 # series resistance in ohms
R_a=0.04 # armature winding resistance in ohms
R_f=50 # shunt feild winding resistance in ohms
Eff=0.89 # efficiency
N=1000 # speed in rpm
I=P_o/V_t # amperes
I_f=V_t/R_f # amperes
I_a=I+I_f
P_cu=R_a*I_a**2+R_se*I_a**2+R_f*I_f**2 # copper loss in watts
print '(a) Cu-loss = %.2f watts'%P_cu
P_i=P_o/Eff # input power in watts
P_L=P_i-P_o # total losses in watts
P_fric=P_L-P_cu
print '(b) Iron and friction loss = %.2f watts'%P_fric
T=P_i*60/(2*pi*N)
print '(c) Torque = %.2f N-m'%T
from math import pi,ceil
I_a=50 # amperes
P=6 # no.of poles
E_g=200 # volts
N=1500 # speed in rpm
A=6
L=0.25 # meter
d=0.2 # meter
B=0.9 # tesla
Theta=360/P # angle subtended by pole shoe in degrees
l=pi*L*Theta/360 # arc length of pole shoe in meter
area=l*d # meter**2
Phy=B*area
print '(a) Flux per pole = %.2f Weber'%Phy
Z=ceil(E_g*60/(Phy*N))
print '(b) Total no. of conductors=%.2f'%Z
T=9.55*E_g*I_a/N
print '(c) Torque = %.2f Newton-meter'%T
P=40000 # watts
E_g=400 # volts
A=4
Pole=4
Z=2*30*12 # no. of conductors
theta_m=10 # degrees
I_a=P/E_g # armature current in amperes
I=I_a/A # current in each conductor in amperes
AT_d=Z*I*theta_m/360
print '(a) Demagnetizing Ampere Turns per pole=%.2f'%AT_d
AT_cm=Z*I*((1/(2*Pole))-(theta_m/360))
print '(b) Cross magnetizing Ampere Turns per pole=%.2f'%AT_cm
n=Z*I*0.8/(2*Pole*100)
print '(c) Number of turns per pole=%.2f'%n
V_t1=280 # terminal voltage of generator-1 in volts
V_nl1=240 # no-load voltage of generator-1 in volts
V_t2=300 # terminal voltage of generator-2 in volts
V_nl2=240 # no-load voltage of generator-2 in volts
I_s1=40 # supply current to generator-1 in amperes
I_s2=50 # supply current to generator-2 in amperes
V_d1=V_t1-V_nl1 # voltage drop for generator-1 in volts
V_d2=V_t2-V_nl2 # voltage drop for generator-2 in volts
V_d1_pa=V_d1/I_s1 # voltage drop per ampere for generator-1 in volts/ampere
V_d2_pa=V_d2/I_s2 # voltage drop per ampere for generator-2 in volts/ampere
I_2=(20+60)/(V_d1_pa+V_d2_pa) # amperes
I_1=60-I_2 # amperes
print '(a) Current supplied by generator-1 = %.2f amperes'%I_1
print ' Current supplied by generator-2 = %.2f amperes'%I_2
V_1=V_t1-(V_d1_pa*I_1) # volts
V_2=V_t2-(V_d2_pa*I_2) # volts
print '(b) Output voltage of generator-1 = %.2f volts'%V_1
print '(b) Output voltage of generator-2 = %.2f volts'%V_2
P_1=V_1*I_1/1000 # kilo watts
P_2=V_2*I_2/1000 # kilo watts
print '(c) Output KW of generator-1 = %.2f kilo watts'%P_1
print '(c) Output KW of generator-2 = %.2f kilo watts'%P_2
V=250 # volts
I_L=80 # amperes
R_a=0.12 # ohms
R=100 # ohms
I_f=V/R # amperes
I_a1=I_L+I_f # amperes (generator)
E_1=V+(I_a1*R_a) # volts (generator)
I_a2=I_L-I_f # amperes (motor)
E_2=V-(I_a2*R_a) # volts (motor)
Ratio=E_1/E_2
print 'Ratio of speed as a generator to speed as motor=%.2f'%Ratio
V=200 # volts
I_a0=2 # amperes
R_a=0.4 # ohms
I_a1=50 # amperes
N_1=1200 # rpm
E_0=V-(I_a0*R_a) # volts
E_1=V-(I_a1*R_a) # volts
N_0=N_1*(E_0/E_1) # rpm
print 'No-load speed = %.2f rpm'%N_0
V=250 # volts
I_L1=5 # amperes
R_a=0.2 # ohms
R_f=250 # ohms
I_f=V/R_f # amperes
I_a1=I_L1-I_f # amperes
I_L2=50 # amperes
I_a2=I_L2-I_f # amperes
N_1=1000 # rpm
E_2=V-(I_a2*R_a) # volts
E_1=V-(I_a1*R_a) # volts
N_2=N_1*(E_2/E_1) # rpm
print 'speed of motor = %.2f rpm'%N_2
V=250 # volts
P_i=50*10**3 # watts
I_L1=P_i/V # amperes
R_a=0.02 # ohms
R_f=50 # ohms
I_f=V/R_f # amperes
I_a1=I_L1+I_f # amperes
I_L2=P_i/V # amperes
I_a2=I_L2-I_f # amperes
N_1=400 # rpm
E_2=V-(I_a2*R_a)-(2*1) # volts
E_1=V+(I_a1*R_a)+(2*1) # volts
N_2=int(N_1*(E_2/E_1)) # rpm
print 'speed of motor = %.2f rpm'%N_2
from math import pi
P=4 # no of poles
Z=560 # no of conductors
A=2
V=250 # volts
P_o=10*10**3 # watts
R_a=0.2 # ohms
I_f=1 # amperes
I_a=60 # amperes
N=1000 # rpm
V_b=1*2#in volts
E=V-(I_a*R_a)-V_b # volts
T=60*E*I_a/(2*pi*N) # Newton-meter
print '(a) Total torque = %.2f Newton-meter'%T
T_useful=P_o*60/(2*pi*N)
print '(b) Useful torque = %.2f Newton-meter'%T_useful
Phy=60*E*A/(N*P*Z)
print '(c) Useful flux per pole = %.2f Weber'%Phy
P_d=(V*I_a)-((I_a**2)*R_a)-(V_b*I_a) # Watts
P_rot=P_d-P_o
print '(d) Rotational losses = %.2f Watts'%P_rot
P_i=V*(I_a+I_f) # Watts
Eff=P_o*100/P_i
print '(e) Efficiency = %.2f %%'%Eff
V=460 # volts
R_a=0.8 # ohms
I_a1=40 # amperes
I_a2=30 # amperes
N_1=500 # rpm
E_1=V-(I_a1*R_a) # volts
E_2=V-(I_a2*R_a) # volts
N_2=int(E_2*I_a1*N_1/(E_1*I_a2))
print 'Speed = %.2f rpm'%N_2
ratio=(I_a2/I_a1)**2
T_c=(1-ratio)*100
print 'Percentage change in torque=%.2f'%T_c
from math import sqrt
V=220 # volts
R_a=0.1 # ohms
I_a1=100 # amperes
I_a2=sqrt(I_a1**2/2) # amperes
N_1=800 # rpm
E_1=V-(I_a1*R_a) # volts
E_2=V-(I_a2*R_a) # volts
N_2=int(E_2*I_a1*N_1/(E_1*I_a2))
print 'Speed = %.2f rpm'%N_2
V=250 # volts
R_a=0.25 # ohms
I_a1=50 # amperes
I_a2=I_a1/0.9 # amperes
N_1=750 # rpm
E_1=V-(I_a1*R_a) # volts
E_2=V-(I_a2*R_a) # volts
N_2=int(E_2*N_1/(E_1*0.9))
print 'Speed = %.2f rpm'%N_2
V=120 # volts
V_b=3 # volts
R_a=0.2 # ohms
R_f=60 # ohms
I_L1=40 # amperes
I_f=V/R_f # inn amperes
I_a1=I_L1-I_f # amperes
N_1=1800 # rpm
E_1=V-(I_a1*R_a)-V_b # volts
I_L2=I_L1/2
I_a2=I_L2-I_f
E_2=V-(I_a2*R_a)-V_b # volts
N_2=int(E_2*N_1/E_1)
print '(a) Speed at half load = %d rpm'%N_2
I_L3=I_L1*1.25
I_a3=I_L3-I_f
E_3=V-(I_a3*R_a)-V_b # volts
N_3=int(E_3*N_1/E_1)
print '(b) Speed at 125%% load = %d rpm'%N_3
V=220 # volts
R_a=0.1 # ohms
N_1=800 # rpm
N_2=520 # rpm
I_a1=20 # ampers
E_1=V-(I_a1*R_a) # volts
E_2=N_2*E_1/N_1 # volts
R_A=-(E_2-V+I_a1*R_a)/20
print 'Additional resistance = %.2f ohms'%R_A
V=240 # volts
R_a=0.3 # ohms
N_1=1500 # rpm
I_a=40 # ampers
E=V-(I_a*R_a) # volts
R_1=(V-I_a*R_a)/I_a
print '(a) Additional resistance at starting = %.2f ohms'%R_1
N_2=1000 # rpm
E_2=N_2*E/N_1 # volts
R_2=-(E_2-V+I_a*R_a)/I_a
print '(b) Additional resistance at 1000 rpm = %.2f ohms'%R_2
V=250 # volts
R_a=0.2 # ohms
N_1=800 # rpm
R_f=250 # ohms
I_f=V/R_f # amperes
I=41 # ampers
I_a1=I-I_f # amperes
E_1=V-(I_a1*R_a) # volts
E_2=V-(I_a1*(R_a+2)) # volts
N_2=E_2*N_1/E_1
print '(a) Speed at full load = %.2f rpm'%N_2
I_a2=I_a1*2 # amperes
E_3=V-I_a2*(R_a+2) # volts
N_3=E_3*N_1/E_1 # rpm
print '(b) Speed at double full load = %.2f rpm'%N_3
I_ao=V/(R_a+2)
r=I_ao/I_a1
print '(c) stalling torque is %.2f times full load torque'%r
V=200 # volts
R_a=0.4 # ohms
N_1=1000 # rpm
N_2=800 # rpm
I_a1=20 # amperes
E_1=V-(I_a1*R_a) # volts
I_a2=0.8*I_a1 # amperes
E_2=N_2*I_a2*E_1/(N_1*I_a1) # volts
R=-(E_2-193.6)/16
print 'the resistance to be inserted in series = %.2f ohms'%R
from math import sqrt
V=500 # volts
R_a=0.5 # ohms
I_a1=60 # amperes
E_1=V-(I_a1*R_a) # volts
I_a2=sqrt(((0.75)**3)*I_a1**2) # amperes
E_2=0.75*E_1*I_a2/I_a1 # volts
R=-(E_2-480.5)/38.97
print 'the resistance to be inserted in series = %.2f ohms'%R
V=500 # volts
R_a=0.2 # ohms
I_o=4 # amperes
I_f=1 # amperes
P_c=V*I_o-(((I_o-I_f)**2)*R_a) # watts
I_1=20 # /in amperes
P_i1=V*I_1 # watts
P_a1=((I_1-I_f)**2)*R_a # watts
P_L1=P_c+P_a1 # watts
P_o1=P_i1-P_L1 # watts
print '(a) Output = %.2f watts'%P_o1
print ' Efficiency = %.2f %%'%(P_o1/P_i1*100)
I_2=100 # /in amperes
P_i2=V*I_2 # watts
P_a2=((I_2-I_f)**2)*R_a # watts
P_L2=P_c+P_a2 # watts
P_o2=P_i2-P_L2 # watts
print '(b) Output = %.2f watts'%P_o2
print ' Efficiency = %.2f %%'%(P_o2/P_i2*100)
V=240 # volts
V_b=2 # volts
R_a=0.15 # ohms
P=4
Z=700
Phy=0.06 # Webers
A=P
I_o=7 # amperes
I_f=2 # amperes
I=90 # amperes
I_ao=I_o-I_f # amperes
E_bo=V-I_ao*R_a-V_b # volts
N_o=E_bo*60*A/(P*Phy*Z) # rpm
print '(a)no load speed = %.2f rpm'%N_o
I_a=I-I_f # amperes
E_b1=V-I_a*R_a-V_b # volts
N=E_b1*N_o/(E_bo*0.98)
print '(b)Full load speed = %.2f rpm'%N
SR=100*(N_o-N)/N
print '(c)Speed Regulation = %.2f %%'%SR
V=220 # volts
V_b=1 # volts
R_f=110 # ohms
R_a=0.14 # ohms
I_o=7 # amperes
I_f=2 # amperes
I=90 # amperes
N_1=700 # rpm
I_ao=I_o-I_f # amperes
E_bo=V-I_ao*R_a-V_b # volts
I=55 # amperes
I_a1=I-I_f # amperes
E_b1=V-I_a1*R_a-V_b # volts
N_o=E_bo*N_1/E_b1
print '(a)no load speed = %.2f rpm'%N_o
I_a2=35 # amperes
N_2=900 # rpm
E_b2=V-I_a2*R_a-V_b # volts
Phy_r=E_b2*N_1/(E_b1*N_2)
R=(1-Phy_r)*100
print '(b)Percentage reduction in flux per pole = %.2f %%'%R
V=240 # volts
R_f=120 # ohms
R_a=0.25 # ohms
I_1=60 # amperes
I_f=V/R_f # amperes
I_a1=I_1-I_f # amperes
E_b1=V-I_a1*R_a # volts
N_o=1000 # rpm
I=6 # amperes
I_ao=I-I_f # amperes
E_bo=V-I_ao*R_a # volts
N_1=N_o*E_b1/E_bo
print '(a)Full load speed = %.2f rpm'%N_1
SR=100*(N_o-N_1)/N_o
print '(b)Speed regulation = %.2f %%'%SR
P_o=E_b1*I_a1-(E_bo*I_ao)
HP=P_o/746
print '(c)HP rating = %.2f HP'%HP
P_i=V*I_1
Eff=P_o*100/P_i
print '(d)Efficiency = %.2f %%'%Eff
V=240 # volts
P=4
Phy=0.008 # webers
Z=1000
A=2
R_f=240 # ohms
R_a=0.4 # ohms
I_1=25 # amperes
I_f=V/R_f # amperes
I_a1=I_1-I_f # amperes
E_b=V-I_a1*R_a # volts
N=E_b*60*A/(P*Z*Phy)
print '(a)speed = %.2f rpm'%N
P_m=E_b*I_a1
T_g=(9.55*P_m)/N
print '(b)Torque = %.2f N-m'%T_g
P_f=P_m-800
P_i=V*I_1
Eff=P_f*100/P_i
print '(c)Efficiency = %.2f %%'%Eff
P_out=20000 # watts
P_in=23000 # watts
V=250 # volts
R_f=125 # ohms
R_a=0.2 # ohms
I_L=P_in/V # amperes
I_f=V/R_f # amperes
I_a1=I_L-I_f # amperes
P_cu=(I_a1**2)*R_a
P_fcu=V*I_f
P_tcu=P_cu+P_fcu
P_fric=P_in-P_out-P_tcu
P_o=12000 # watts
P_m=P_o+P_fric
I_a2=53.85
P_tcu2=((I_a2**2)*R_a)+250
P_in_2=P_m+P_tcu2
print 'Power input = %.2f watts'%P_in_2
Eff=P_o*100/P_in_2
print 'Efficiency = %.2f %%'%Eff
from math import sqrt
V=240 # volts
R_f=240 # ohms
R_a=0.6 # ohms
I_o=5 # amperes
I=18 # amperes
I_f=V/R_f # amperes
I_ao=I_o-I_f
I_a1=I-I_f
E_bo=V-I_ao*R_a # volts
E_b1=V-I_a1*R_a # volts
P_dnL=E_bo*I_ao # watts
P_m=E_b1*I_a1 # watts
P_o=P_m-P_dnL
P_i=V*I # watts
Eff=P_o/P_i
print '(a)Efficiency = %.2f %%'%(Eff*100)
I_a=sqrt((P_dnL+V*1)/R_a)
print '(b)Armature current = %.2f Amperes'%I_a
E_b=V-I_a*R_a
P_m2=E_b*I_a # watts
P_out=P_m2-P_dnL # watts
P_in=V*I_a # watts
Eff_m=P_out/P_in
print '(c)Max Efficiency = %.2f %%'%(Eff_m*100)
V=230 # volts
R_a=0.4 # ohms
I_a1=3.4 # amperes
R_f=170 # ohms
E_b1=V-I_a1*R_a
I_f=V/R_f
I_L=41 # amperes
I_a2=I_L-I_f
E_b2=214.142 # volts
N_1=1000 # rpm
N_2=N_1*E_b2/(E_b1*0.96) # rpm
print '(a)Speed at full load = %.2f rpm'%N_2
T_a=9.55*E_b2*I_a2/N_2
print 'Torque Developed = %.2f N-m'%T_a
P_r=E_b1*I_a1
P_m=E_b2*I_a2
P_f=P_m-P_r
print '(b)Shaft Power = %.2f watts'%P_f
P_in=V*I_L
Eff=P_f/P_in
print '(c)Efficiency = %.2f %%'%(Eff*100)
V=240 # volts
R_a=0.25 # ohms
R_f=120 # ohms
I_f=V/R_f
I_L=26.0 # amperes
I_a=I_L-I_f
N_1=1000.0 # rpm
N_2=900.0 # rpm
E_b1=V-I_a*R_a
r=N_1/N_2
R=(E_b1-(E_b1/r))/I_a
print '(a)Value of external resistance when the load torque is independent of speed = %.2f ohms'%R
I_a2=I_a/r
R1=(E_b1-(E_b1/r))/I_a2
print '(b)Value of external resistance when the load torque is proportional to speed = %.2f ohms'%R1
I_a2_n=I_a/r**2
R2=(E_b1-(E_b1/r))/I_a2_n
print '(a)Value of external resistance when the load torque is independent of speed = %.2f ohms'%R2
from math import sqrt
V=240 # volts
P=10000 # watts
R_a=0.25 # ohms
R_f=160 # ohms
I_f=V/R_f
I_L=5.2 # amperes
I_ao=I_L-I_f
W=V*I_ao-I_ao**2*R_a
I_a=(V-sqrt(V**2-4*R_a*(P+W)))/(2*R_a)
P_in=P+W+I_a**2*R_a+I_f**2*R_f
Eff=P/P_in
print 'Efficiency of the motor = %.2f %%'%(Eff*100)
V=440 # volts
N_1=1000 # rpm
N_2=1050 # rpm
r=N_1/N_2
V_drop=2*(V-V*r)
print 'Armature voltage drop = %.2f volts'%V_drop
V=220 # volts
R_a=2.5 # ohms
N_1=859 # rpm
I_ao=0
I_a=8 # amperes
E_b1=V-I_a*R_a
E_bo=V-I_ao*R_a
N_o=N_1*E_bo/E_b1
print 'No Load Speed = %.2f RPM'%N_o
from math import sqrt
V=220 # volts
R_a=0.2 # ohms
R_f=110 # ohms
N_1=700 # rpm
N_2=900 # rpm
T_a1=90 # N-m
T_a2=70 # N-m
I_1=27 # amperes
I_f=V/R_f
I_a1=I_1-I_f
E_b1=V-I_a1*R_a
x=(V+sqrt(V**2-4*276.43*4.168))/(2*276.43)
print 'percentage reduction in feild flux = %.2f %%'%((1-x)*100)
I_f2=x*I_f
R=(V-I_f2*R_f)/I_f2
print 'Value of additional resistance = %.2f ohms'%R
from math import sqrt
V=400 # volts
R_f=200 # ohms
I_1=25 # amperes
I_f=V/R_f
I_a1=I_1-I_f
x=(-V+sqrt(V**2+4*345*400))/(2*345)
print 'New Speed is= %.2f'%(x*100)
print 'percent of original speed'