#Chapter 5, Exmaple 2, page 173
#Calculate breakdown voltage
#(a)Based on equation 4.13
p = 101.3 # kPa
Ep = 2400.4/0.027
E = p*Ep
d = 1*10**-3 # 1 mm
Vs1 = E*d
print"\n Part (a): based on equation 4.13"
print"\n Breakdown voltage = V or kV",Vs1,round(Vs1*10**-3)
#(b)Corrsponding to an avelanche size of 10**8
p = 101.3 # kPa
Cp = Ep*0.027*p
Vs2 = (18.42 + (Cp*10**-3))/0.027
print"\n Part (b):Corrsponding to an avelanche size of 10**8"
print"\n Breakdown voltage = V or kV",Vs2,round(Vs2*10**-3,1)
#(b)According to criteria expressed by Equations 5.4 and 5.5
p = 101.3 # kPa
Vs3a = 9.4
Vs3b = 9.2
print"\n Part (c):According to criteria expressed by Equations 5.4 and 5.5"
print"\n Breakdown voltage = kV or kV",Vs3a,Vs3b
#Answer may vary due to round off error
#Chapter 5, Exmaple 3, page 174
#Calculate breakdown voltage at atm pressure 3 and 5
#(a)Based on equation 5.14
p = 101.3 # kPa
Ep = 2400.4/0.027
E = p*Ep
d = 1*10**-3 # 1 mm
Vs13 = E*d*3 # at 3 atm
Vs15 = E*d*5 # at 5 atm
print"\n Part (a): based on equation 5.14"
print"\n Breakdown voltage = kV or kV",Vs13*10**-3,round(Vs15*10**-3,2)
#(b)According to eqution 5.13
p = 101.3 # kPa
Cp3 = Ep*0.027*p*3 # at 3 atm
Vs23 = (18.42 + (Cp3*10**-3))/0.027
Cp5 = Ep*0.027*p*5 # at 5 atm
Vs25 = (18.42 + (Cp5*10**-3))/0.027
print"\n Part (b):According to eqution 5.13"
print"\n Breakdown voltage = V or kV",Vs23*10**-3,round(Vs25*10**-3,2)
#(b)According to criteria expressed by Equations 5.4 and 5.5
p = 101.3 # kPa
Vs3a = 27.73 # at 3 atm
Vs3b = 45.5 # at 5 atm
print"\n Part (c):According to criteria expressed by Equations 5.4 and 5.5"
print"\n Breakdown voltage = kV or kV",round(Vs3a,1),round(Vs3b,1)
#Answer may vary due to round off error
#Chapter 5, Exmaple 8, page 179
#Calculate corona onset voltage
s = 4 # cm
r = 1 # cm
D = 5*10^2 # cm
dt = 1
E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)
print"\n E0 = kVpeak/cm",E0
#using equations (5.18), the positive and negative corona
En = 27.501 # kVpeak/cm
#part a
Vp1 = 6.2*E0
Vn1 = 6.2*En
print"\n Part (a)"
print"\n The postive corona = kVpeak",Vp1
print"\n The negative corona = kV",round(Vn1)
#part b
Vp2 = 8.32*E0
Vn2 = 8.32*En
print"\n Part (b)"
print"\n The postive corona = kVpeak",Vp2
print"\n The negative corona = kV",round(Vn2,1)
#part c
Vp3 = 9.97*E0
Vn3 = 9.97*En
print"\n Part (c)"
print"\n The postive corona = kVpeak",Vp3
print"\n The negative corona = kV",round(Vn3,1)
#part d
Vp4 = 11.39*E0
Vn4 = 11.39*En
print"\n Part (d)"
print"\n The postive corona = kVpeak",Vp4
print"\n The negative corona = kV",round(Vn4,1)
#Answer CONSIDERABLY vary due to round off error.
#Chapter 5, Exmaple 9, page 180
#Calculate corona onset voltage
from math import log
t = 5*5*8.66 # the three side of the trangle in m
Deq = 6.004626#nthroot(t,3)
dt = 1 #delta = 1 at standard temperature and pressure
r = 1 #radius of the conductor
En = 27.501 # kVpeak/cm
E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)
V0peak = E0*log(Deq*10**2)
V0 = En*log(Deq*10**2)
print"\n Mean geometric distance between the conductors m",Deq
print"\n E0 = kVpeak/cm",E0
print"\n V0peak = kVpeak",V0peak
print"\n V0 = kV",round(V0,1)
#Answers may vary due to round off error
#Chapter 5, Exmaple 10, page 180
#Calculate corona power loss
from math import log
p = 75 # pressure
t = 35 # temprature
m1 = 0.92
m2 = 0.95
t = 5*5*8.66 # the three side of the trangle in m
Deq = 6.004626#nthroot(t,3)
dt = (3.92*p)/(273+t) #Relative air density
E0 = 30*dt*(1 + 0.3*(dt)**0.5)*m1*m2
En = 27.501 # kVpeak/cm
Vph = (275*10**3)/(3)**0.5
V0peak = E0*log(Deq*10**2)
V0 = En*log(Deq*10**2)
V0ratio = 275/V0
print"\n Reative air density ",dt
print"\n Corona onset field = kVpeak/cm",E0
print"\n V0peak = kVpeak",V0peak
print"\n V0 = kV",V0
print"\n Ration of V0 = ",V0ratio
K = 0.05 # K factor
Pc = (3.73*K*50*Vph**2)/(Deq*10**2)**2
Cc = Pc*10**3/Vph
print"\n Corona power loss Pc = kW/km",Pc*10**-5
print"\n Corona current = mA/Km",round(Cc*10**-2,1)
#Answer vary due to round off error
#Some of the answers provided in the textbook are wrong
#Chapter 5, Exmaple 11, page 180
#Calculate corona onset voltage and effective corona envelope
from math import log
#(a) corona onset voltage
r = 3.175 # cm
h = 13 # m
m= 0.9 # m1 and m2
dt = 1 # Relative air density
E0 = 30*dt*(1 + 0.3/(r)**0.5)*m*m
V0 = 20*r*log(2*h*10**2/r)
print"\n E0 = kVpeak/cm or 20 kV/cm",E0
print"\n V0 = kV",V0
print"\n V0 (line to line) = kV",round(V0*(3)**0.5,1)
#(b)Corona envelope at 2.5 p.u
V = 2.5*525 # line to line voltage * 2.5
print"\n Voltage (line to line) = kV",V
#Solving the equations in trila and error method
print"\n Envelope radius = 5 cm"
# Answers may vary due to round off error.