V_i = 100.0 #Incident voltage(kV)
Z_1 = 400.0 #Surge impedance(ohm)
Z_2 = 350.0 #Surge impedance(ohm)
beta = 2*Z_2/(Z_1+Z_2) #Refraction coeffeicient of voltage
alpha = (Z_2-Z_1)/(Z_1+Z_2) #Reflection coeffeicient of voltage
V_t = beta*V_i #Refracted voltage(kV)
V_r = alpha*V_i #Reflected voltage(kV)
I_t = V_t/Z_2*1000 #Refracted current(A)
I_r = -(V_r/Z_1)*1000 #Reflected current(A)
print('Reflected voltage , V_r = %.1f kV' %V_r)
print('Refracted voltage , V_t = %.1f kV' %V_t)
print('Reflected current , I_r = %.1f A' %I_r)
print('Refracted current , I_t = %.1f A' %I_t)
V_i = 100.0 #Incident voltage(kV)
Z_1 = 400.0 #Surge impedance(ohm)
Z_21 = 350.0 #Surge impedance of line connected at T(ohm)
Z_22 = 50.0 #Surge impedance of cable connected at T(ohm)
Z_2 = Z_21*Z_22/(Z_21+Z_22) #Surge impedance(ohm)
V_t = 2*Z_2*V_i/(Z_1+Z_2) #Refracted voltage(kV)
V_r = (Z_2-Z_1)*V_i/(Z_1+Z_2) #Reflected voltage(kV)
I_t1 = V_t/Z_21*1000 #Refracted current in Z_21(A)
I_t2 = V_t/Z_22*1000 #Refracted current in Z_22(A)
I_r = -(V_r/Z_1)*1000 #Reflected current in Z_1(A)
print('Refracted voltage , V_t = %.2f kV' %V_t)
print('Refracted current in overhead line , I_t1 = %.2f A' %I_t1)
print('Refracted current in underground cable , I_t2 = %.2f A' %I_t2)
V_i = 100.0 #Incident voltage(kV)
Z_1 = 400.0 #Surge impedance of overhead line(ohm)
Z_2 = 50.0 #Surge impedance of underground cable(ohm)
beta = 2*Z_2/(Z_1+Z_2) #Refraction coeffeicient of voltage
alpha = (Z_2-Z_1)/(Z_1+Z_2) #Reflection coeffeicient of voltage
V_t = beta*V_i #Refracted voltage(kV)
V_r = alpha*V_i #Reflected voltage(kV)
I_t = V_t/Z_2*1000 #Refracted current(A)
I_r = -(V_r/Z_1)*1000 #Reflected current(A)
print('Reflected voltage , V_r = %.1f kV' %V_r)
print('Refracted voltage , V_t = %.1f kV' %V_t)
print('Reflected current , I_r = %.1f A' %I_r)
print('Refracted current , I_t = %.1f A' %I_t)
R = 74.0*10**-6 #Resistance of overhead line(ohm/meter)
L = 1.212*10**-6 #Inductance of overhead line(H/meter)
C = 9.577*10**-12 #Capacitance of overhead line(F/meter)
import math
Z_0 = (L/C)**0.5 #Surge impedance of line(ohm)
a = R/(2*Z_0)
x_1 = math.log(2)/a #Distance to be travelled(m)
print('The distance the surge must travel to attenuate to half value = %.2e meter = %.2e km' %(x_1,x_1*10**-3))
V_i = 2000.0 #Incident voltage(kV)
Z = 300.0 #Surge impedance(ohm)
V_p = 1200.0 #Arrester protection level(kV)
I_surge = V_i/Z #Surge current(kA)
V_oc = 2*V_i #Open-circuit voltage(kV)
I_A = (V_oc-V_p)/Z #Current through the arrestor(kA)
I_r = I_A - I_surge #Reflected current in line(kA)
V_r = -I_r*Z #Reflected voltage of line(kV)
V_t = V_p #Refracted voltage into arrestor(kV)
V_r_coeff = V_r/V_i #Reflected coefficient of voltage
V_t_coeff = V_t/V_i #Refracted coefficient of voltage
R_a = V_p/I_A #Arrestor resistance(ohm)
print('Case(a) :')
print('Current flowing in line before the surge voltage reaches the arrestor terminal = %.2f kA' %I_surge)
print('\nCase(b) :')
print('Current through the arrestor , I_A = %.2f kA' %I_A)
print('\nCase(c) :')
print('Refraction coefficient of voltage at arrestor terminals = %.1f ' %V_t_coeff)
print('Reflection coefficient of voltage at arrestor terminals = %.1f ' %V_r_coeff)
print('\nCase(d) :')
print('Value of arrestor resistance = %.1f ohm' %R_a)