#calculate saving in copper
#Given data :
VL1=220.##Volts
VL2=400.##Volts
print '%s' %("We know, W=I**2*2*R=(P/VL)**2*2*rho*l/a")#
print '%s ' %("a=(P/VL)**2*2*rho*l/(I**2*2*R)")#
print '%s' %("v=2*(P/VL)**2*2*rho*l/(I1**2*2)*l")#
saving=(2./(VL1)**2.-2./(VL2)**2.)/(2./(VL1)**2.)*100.##%
print '%s %.2f' %("% saving in copper : ",saving)#
#calculate 3-phase four wire system material required
print '%s' %("Two wire dc system : ")#
print '%s' %("I1=P/V & W=2*I1**2*R1=2*P**2*rho*l/V**2/a1")#
print '%s' %("Therefore, Volume required, v1 is 2*a1*l=4*P**2*rho*l**2/V**2/W")#
print '%s ' %("Three phase four wire system : ")#
print '%s ' %("I2=P/3/Vas Power by each phase is P/3 & W=3*I1**2*R2=P**2*rho*l/3/V**2/a2")#
print '%s ' %("Therefore, Volume required, v2 is 3.5*a2*l=3.5*P**2*rho*l**2/3/V**2/W")#
v2BYv1=3.5/3./4.##
print '%s %.3f %s' %("For 3-phase four wire system material required is ",v2BYv1," times the material required in two wire system.")#
#calculate Additional load that can be tranmitted by converting sigle to 3-phase line
import math
print '%s ' %("For single phase ac system, P1=V*I1*cosd(fi) watts & W1=2*I1**2*R watts")#
print '%s ' %("Line losses=W1/P1*100=2*I1**2*R*100/V/I1/cosd(fi)")#
print '%s ' %("For three phase ac system, P2=sqrt(3)*V*I2*cosd(fi) watts & W2=3*I2**2*R watts")#
print '%s ' %("Line losses=W2/P2*100=3*I2**2*R*100/sqrt(3)/V/I2/cosd(fi)")#
#on equating W1/P1*100.=W2/P2*100.
I2BYI1=2*math.sqrt(3.)/3.#
P1=100
P2=2*P1#
Add_load=P2-P1#
Percent_add_load=(P2-P1)/P1*100##%
print '%s %.2f' %("Additional load that can be tranmitted by converting sigle to 3-phase line in %",Percent_add_load)#
#calculate Extra power that can be supplied
print '%s' %("For three wire dc system, line current I1=(VS-VL)/R & P1=2*VL*I1=2*VL*(VS-VL)/R")#
print '%s' %("For four wire three phase ac system, line current I2=(VS-VL)/R & P2=3*VL*I2*pf=3*VL*(VS-VL)/R")#
#P2=3/2*2*VL*(VS-VL)/R##It implies that P2=3/2*P1
P1=100#
P2=3./2.*P1#
Diff=P2-P1#
Percent_Diff=(Diff/P1*100)##%
print '%s %.2f' %("Extra power that can be supplied in %",Percent_Diff)#
#calculate the Additional load
pf=0.9##power factor
print '%s' %("Three wire dc system : ")#
print '%s' %("P1=2*I1*V & %P1loss=2*I1**2*R/(2*I1*V)*100=100*I1*R/V")#
print '%s' %("Three phase 4-wire ac system : ")#
print '%s' %("P2=3*I1**2*V*pf & %P2loss=3*I2**2*R/(3*I2*V*pf)*100=100*I12*R/pf/V")#
#on equating P1loss=P2loss#
I2BYI1=100*pf/100##ratio
#P2=3*I2*V*pf
P2BYI1V=3.*pf*I2BYI1#
P2BYP1=P2BYI1V/2.#
#LoadIncrease=(P2-P1)*100/P1#
LoadIncrease=(P2BYP1-1.)*100.##%
print '%s %.2f' %("% Additional load : ",LoadIncrease)#
#calculate Weight of copper required for 3 conductors of 100 km length
#Given data :
import math
Pin=100.##MW
VL=380.##kV
d=100.##km
R=0.045##ohm/cm**2/km
w=0.01##kg/cm**3
Eta=90.##efficiency %
cosfi=1.#
IL=Pin*10.**6./math.sqrt(3.)/VL/10.**3./cosfi##Ampere
W=Pin*(1-Eta/100)##MW
LineLoss=W*10**6/3##Watts/conductor
R1=LineLoss/IL**2##in ohm
R2=R1/d##resistance per conductor per km
a=R/R2##in cm**2
volume=a*d*1000##cm**3 per km run
weight=w*volume##kg per km run
w3=3.*d*weight##kg(weight of copper required for 3 conductors for 100 km)
print '%s %.2f' %("Weight of copper required for 3 conductors of 100 km length(in kg) : ",w3)#
#Answer in the book is not accurate.