import math
#initialisation of variables
t=21.0 # air temperature
b=73.6 # air pressure
do=3.92*73.6/(273+t)
m=0.85
r=0.52
d=250.0
#Calculations
Vd=21.1*m *do*r*math.log(250/.52)
vd=math.sqrt(3)*Vd
m=0.7
vv=21.1*m*do*r*(1+(0.3/math.sqrt(r*do)))*math.log(250/0.52)
Vv=vv*math.sqrt(3)
Vvg=Vv*0.8/0.7
#Results
print("critical disruptive line to line voltage=%.2f kV " %vd)
print("visual critical voltage for local corona=%.2f kV " %vv)
print("visual critical voltage for general corona=%.2f kV " %Vvg)
import math
#initialisation of variables
d=2.5
di=3.0 # internal diameter
do=9.0 # external diameter
ri=di/2.0 # internal radius
ro=do/2.0 # external diameter
#Calculations
g1max=20/(1.25*math.log(ri/(d/2))+0.208*1.5*math.log(ro/ri))
#Results
print("g1max=%.0f kV/cm" %g1max)
print("Since the gradient exceeds 21.1/kV/cm , corona will be present.")
import math
#initialisation of variables
m=1.07
r=0.625
#Calculations
V=21*m *r*math.log(305.0/0.625)
Vl=V*math.sqrt(3.0)
#Results
print("critical disruptive voltage=%.0f kV " %V)
print("since operating voltage is 110 kV , corona loss= 0 ")
import math
#initialisation of variables
r=0.5
#Calculations
V=21*r*math.log(100.0/0.5)
#Results
print("critical disruptive voltage=%.1f kV" %V)
import math
#initialisation of variables
D=1.036 # conductor diameter(cm)
d=2.44 #delta spacing(m)
r=D/2 #radius(cm)
#Calculations
Ratio=d*100.0/r
j=r/(d*100.0)
Rat2=math.sqrt(j)
t=26.67 #temperature
b=73.15 # barometric pressure
mv=0.72
V=63.5
f=50.0 #frequency
do=3.92*b/(273+t) #do=dell
vd=21.1*.85*do*r*math.log(Ratio)
print("critical disruptive voltage=%.2f kV" %vd)
Vv=21.1*mv*do*r*(1+(0.3/math.sqrt(r*do)))*math.log(Ratio)
Pl=241*(10**-5)*(f+25)*Rat2*((V-vd)**2)/do #power loss
Vd=0.8*vd
Pl2=241*(10**-5)*(f+25)*Rat2*((V-Vd)**2)*160/do #loss per phase /km
Total=3.0*Pl2
#Results
print("visual critical voltage=%.0f kV" %Vv)
print("Power loss=%.3f kW/phase/km" %Pl)
print("under foul weather condition ,")
print("critical disruptive voltage=%.2f kV" %Vd)
print("Total loss=%.0f kW\n"%Total)