In [1]:

```
from __future__ import division
import math
#given data:
L=30 #load in kW
pf=0.8#power factor
Vl=250#line voltage in volts
#calculations:
I=((L*10**3)/(Vl*pf*math.sqrt(3)))#line current in ampers
Ip1=I # in star connection
Ip2=I/(math.sqrt(3))#phase current
Il=math.sqrt(3)*Ip2#line current in amperes
#Results
print "(a)line current (star connection) in amperes is",round(I,2)
print "phase current (start connection) in amperes is",round(Ip1,2)
print "(b)phase current in ampere is",round(Ip2,2)
print "line current (delta connection ) in amperes is",round(Il,2)
```

In [2]:

```
from __future__ import division
import math
#given data:
R=11.88#coil resistance in ohms
L=0.07#inductance in henry
f=50 # in hertz
pf=0.48#power factor
Vl=433#line voltage in volts
#calculations:
Vp1= Vl/(math.sqrt(3))#phase voltage
Xl1=(2*math.pi*f*L)#in ohms
Zb1=math.sqrt(R**2+Xl1**2)# in ohms
Ie1=Vp1/Zb1#current in each winding in amperes
Il1=Ie1#line current in amperes
W1=math.sqrt(3)*Vl*Il1*pf#power in watts
Vp2= Vl#phase voltage
Xl2=(2*math.pi*f*L)#in ohms
Zb2=math.sqrt(R**2+Xl2**2)# in ohms
Ie2=Vp2/Zb2#current in each winding in amperes
Il2=math.sqrt(3)*Ie2#line current in amperes
W2=math.sqrt(3)*Vl*Il2*pf#power in watts
#Results
print "(a)line current in ampere is",round(Il1)
print "power taken in connection in kW is",round(W1*10**-3,1)
print "(b)line current in ampere is",round(Il2)
print "power taken in connection in kW is",round(W2*10**-3,1)
```

In [3]:

```
from __future__ import division
#given data:
Vl=1100#line voltage in volts
n=99 #motor efficiency in percentage
pf= 0.8#power factor
#calculations:
Mo=n*735.5#output of the motor
Mi=(Mo*100)/75# INPUT OF THE MOTOR IN WATTS
Il=(Mi)/(math.sqrt(3)*Vl*pf)#line current in amperes
Ip=Il/(math.sqrt(3))#phase current in amperes
Ipm=Il#phase curent of the motor
Ac1=Ip*pf#active component of phase current in the motor
Rc1=Ip*(math.sqrt(1-pf**2))#reactive component of phase current of motor
Ac2=Ipm*pf#active component of phase current in the generator
Rc2=Ipm*(math.sqrt(1-pf**2))#reactive component of phase current of generator
#Results
print "(a)phase current of motor in amperes is",round(Ip,2)
print "active component of phase current in the motor in amperes",round(Ac1,2)
print "reactive component of phase current in the motor in amperes",round(Rc1,2)
print "(b)phase current of generator in amperes is",round(Ipm,2)
print "active component of phase current in the generator in amperes",round(Ac2,3)
print "reactive component of phase current in the generator in amperes",round(Rc2,3)
```

In [4]:

```
from __future__ import division
import math
#given data:
ni=74.6#efficiency
Mo=40#HP OF MOTOR
tw=40#total in kW
pf=0.8#power factor
#calculations:
mo=Mo*ni#output of motor in watts
mi=(mo*100)/(ni*1000)#input of motor in kW
theta=math.acos(pf)#in degree
v=math.tan(theta)#
dw=(v*tw)/(3**0.5)#
w1=(tw+dw)/2#FIRST READING IN kW
w2=tw-w1#second reading in kW
#Results
print "first reading in kW is",round(w1,2)
print "second reading in kW is",round(w2,2)
```

In [5]:

```
from __future__ import division
import math
#given data:
w1=4.5#first reading in kW
w2=3 #second reading in kW , this value is given wrong in question
#calculations:
tw1=w1+w2#in kW
dw1=w1-w2#in kW
pfa1=math.atan(math.sqrt(3)*(dw1/tw1));
pf1=math.cos(pfa1)#//power factor when both the eadings are positive
tw2=w1-w2#in kW
dw2=w1+w2#in kW
pfa2=math.atan(math.sqrt(3)*(dw2/tw2));
pf2=math.cos(pfa2)#//power factor when second reading is obtained by reversing the connection
#Results
print "(a)power factor when both the readings are positive", round(pf1,3)
print "(b)power factor when second reading is obtained by reversing the connections ",round(pf2,3)
```