In [1]:

```
import math
#Variable declaration
D = 100.0 #Distance between conductors(cm)
d = 1.25 #Diameter of conductor(cm)
f = 50.0 #Frequency(Hz)
#Calculation
r_GMR = 0.7788*d/2.0 #GMR of conductor(cm)
L = 4.0*10**-4*math.log(D/r_GMR) #Loop inductance(H/km)
X_L = 2*math.pi*f*L #Reactance of transmission line(ohm)
#Result
print('Loop inductance of transmission line, L = %.2e H/km' %L)
print('Reactance of transmission line, X_L = %.2f ohm' %X_L)
```

In [1]:

```
import math
#Variable declaration
l = 100.0 #Length of 3-phase transmission line(km)
D = 120.0 #Distance between conductors(cm)
d = 0.5 #Diameter of conductor(cm)
#Calculation
r_GMR = 0.7788*d/2.0 #GMR of conductor(cm)
L = 2.0*10**-4*math.log(D/r_GMR) #Inductance per phase(H/km)
L_l = L*l #Inductance per phase for 100km length(H)
#Result
print('Inductance per phase of the system, L = %.4f H' %L_l)
print('\nNOTE: ERROR: In textbook to calculate L, log10 is used instead of ln i.e natural logarithm. So, there is change in answer')
```

In [1]:

```
import math
#Variable declaration
D = 135.0 #Spacing between conductors(cm)
r = 0.8 #Radius of conductor(cm)
#Calculation
L = (1+4*math.log(D/r))*10**-7*1000.0 #Loop inductance per km(H)
L_mH = L*1000.0 #Loop inductance per km(mH)
#Result
print('Loop inductance of line per km, L = %.2f mH' %L_mH)
```

In [1]:

```
import math
#Variable declaration
l = 80.0 #Length of 3-phase transmission line(km)
D = 100.0 #Distance between conductors(cm)
d = 1.0 #Diameter of conductor(cm)
#Calculation
r_GMR = 0.7788*d/2.0 #GMR of conductor(cm)
L = 2.0*10**-7*math.log(D/r_GMR) #Inductance per phase(H/m)
L_l = L*l*1000.0 #Inductance per phase for 80km(H)
#Result
print('Inductance per phase of the system, L = %.4f H' %L_l)
print('\nNOTE: ERROR: Calculation mistake in textbook to find Inductance per phase of the system')
```

In [1]:

```
import math
#Variable declaration
D_a_b = 120.0 #Distance between conductors a & b(cm)
D_a_bb = 140.0 #Distance between conductors a & b'(cm)
D_aa_b = 100.0 #Distance between conductors a' & b(cm)
D_aa_bb = 120.0 #Distance between conductors a' & b'(cm)
D_a_aa = 20.0 #Distance between conductors a & a'(cm)
d = 2.0 #Diameter of conductor(cm)
#Calculation
D_m = (D_a_b*D_a_bb*D_aa_b*D_aa_bb)**(1.0/4) #Mutual GMD(cm)
D_a_a = 0.7788*d/2.0 #Self GMD of conductor a(cm)
D_aa_aa = D_a_a #Self GMD of conductor a'(cm)
D_aa_a = D_a_aa #Distance between conductors a' & a(cm)
D_s = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD(cm)
L = 4*10**-4*math.log(D_m/D_s) #Total inductance of the line(H/km)
L_mH = L*1000.0 #Total inductance of the line(mH/km)
#Result
print('Total inductance of the line, L = %.2f mH/km' %L_mH)
```

In [1]:

```
import math
#Variable declaration
D_a_b = 175.0 #Distance between conductors a & b(cm)
D_a_aa = 90.0 #Distance between conductors a & a'(cm)
d = 2.5 #Diameter of conductor(cm)
#Calculation
GMR = 0.7788*d/2.0 #GMR(cm)
D_a_a = GMR #Self GMD of conductor a(cm)
D_aa_aa = D_a_a #Self GMD of conductor a'(cm)
D_aa_a = 90.0 #Distance between conductors a' & a(cm)
D_s = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD of conductor A = Self GMD of conductor B(cm)
D_a_bb = (D_a_aa**2+D_a_b**2)**(1.0/2) #Distance between conductors a & b'(cm)
D_m = ((D_a_b*D_a_bb)**2)**(1.0/4) #Mutual GMD(cm)
L = 4*10**-4*math.log(D_m/D_s) #Inductance of the line(H/km)
#Result
print('Inductance of the line, L = %.1e H/km' %L)
```

In [1]:

```
import math
#Variable declaration
D_a_a = 100.0 #Distance between conductors a & a(cm)
D_a_b = 25.0 #Distance between conductors a & b(cm)
d = 2.0 #Diameter of conductor(cm)
#Calculation
r = d/2.0 #Conductor radius(cm)
GMR = 0.7788*r #GMR(cm)
D_a_aa = GMR #GMR of conductors a & a'(cm)
D_aa_a = D_a_aa #GMR of conductors a' & a(cm)
D_aa_aa = D_a_a #GMR of conductors a' & a'(cm)
D_s = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD of conductor A = Self GMD of conductor B(cm)
D_a_bb = (D_a_a**2+D_a_b**2)**(1.0/2) #Distance between conductors a & b'(cm)
D_aa_b = D_a_bb #Distance between conductors a' & b(cm)
D_aa_bb = D_a_b #Distance between conductors a' & b'(cm)
D_m = (D_a_b*D_a_bb*D_aa_b*D_aa_bb)**(1.0/4) #Mutual GMD(cm)
L = 2*10**-7*math.log(D_m/D_s) #Inductance/conductor/mt(H)
L_mH = 2.0*L*1000.0*1000.0 #Loop inductance per km(mH)
#Result
print('Inductance per km of the double circuit line, L = %.1f mH' %L_mH)
```

In [1]:

```
#Variable declaration
n = 7.0 #Number of strands
r = 1.0 #Radius of each conductor. Assume it 1 for calculation purpose
#Calculation
D_1_2 = 2.0*r #Distance between conductor 1 & 2
D_1_6 = 2.0*r #Distance between conductor 1 & 6
D_1_7 = 2.0*r #Distance between conductor 1 & 7
D_3_4 = 2.0*r #Distance between conductor 3 & 4
D_1_4 = 4.0*r #Distance between conductor 1 & 4
D_1_3 = (D_1_4**2-D_3_4**2)**(1.0/2) #Distance between conductor 1 & 3
D_1_5 = D_1_3 #Distance between conductor 1 & 5
GMR = 0.7788*r #GMR
n_o = n-1 #Number of outside strands
D_s = (GMR**n*(D_1_2**2*D_1_3**2*D_1_4*D_1_7)**6*(2*r)**n_o)**(1.0/49) #GMR
overall_radius = 3*r #Overall conductor radius
ratio = D_s/overall_radius #Ratio of GMR to overall conductor radius
#Result
print('Geometric mean radius of the conductor, D_s = %.3f*r' %D_s)
print('Ratio of GMR to overall conductor radius = %.4f ' %ratio)
```

In [1]:

```
import math
#Variable declaration
d = 1.8 #Diameter of conductor(cm)
D_A_B = 4.0 #Distance between conductor A & B(cm)
D_B_C = 9.0 #Distance between conductor B & C(cm)
D_A_C = 6.0 #Distance between conductor A & C(cm)
#Calculation
D_eq = (D_A_B*D_B_C*D_A_C)**(1.0/3) #Equivalent distance(cm)
r_GMR = 0.7788*d/2.0 #GMR(cm)
L = 2*10**-4*math.log(D_eq/r_GMR) #Inductance per phase(H/km)
L_mH = L*1000.0 #Inductance per phase(mH/km)
#Result
print('Inductance of the line per phase, L = %.3f mH/km' %L_mH)
print('\nNOTE: ERROR: Calculation mistake in the textbook')
```

In [1]:

```
import math
#Variable declaration
d = 5.0 #Diameter of conductor(cm)
d_1 = 400.0 #Distance between conductor 1 & 2(cm)
d_2 = 500.0 #Distance between conductor 2 & 3(cm)
d_3 = 600.0 #Distance between conductor 1 & 3(cm)
#Calculation
D_eq = (d_1*d_2*d_3)**(1.0/3) #Equivalent distance(cm)
r_GMR = 0.7788*d/2.0 #GMR(cm)
L = 0.2*math.log(D_eq/r_GMR) #Inductance per phase per km(mH)
#Result
print('Inductance per km of 3 phase transmission line, L = %.3f mH' %L)
print('\nNOTE: ERROR: Calculation mistake in the textbook')
```

In [1]:

```
import math
#Variable declaration
d = 3.0 #Diameter of conductor(cm)
D_12 = 200.0 #Distance between conductor 1 & 2(cm)
D_23 = 200.0 #Distance between conductor 2 & 3(cm)
D_31 = 400.0 #Distance between conductor 1 & 3(cm)
#Calculation
D_eq = (D_12*D_23*D_31)**(1.0/3) #Equivalent distance(cm)
r = d/2.0 #Radius of conductor(cm)
L = (0.5+2*math.log(D_eq/r))*10**-7 #Inductance/phase/m(H)
L_mH = L*1000.0*1000.0 #Inductance per phase per km(mH)
#Result
print('Inductance of each conductor per phase per km, L = %.3f mH' %L_mH)
print('\nNOTE: ERROR: Calculation mistake in the textbook')
```

In [1]:

```
import math
import cmath
#Variable declaration
d = 2.0 #Diameter of conductor(cm)
D_ab = 400.0 #Distance between conductor a & b(cm)
D_bc = 400.0 #Distance between conductor b & c(cm)
D_ca = 800.0 #Distance between conductor c & a(cm)
#Calculation
I_ab = 1.0*cmath.exp(1j*-240.0*math.pi/180) #I_a/I_b
I_cb = 1.0*cmath.exp(1j*-120.0*math.pi/180) #I_c/I_b
r_GMR = 0.7788*d/2.0 #GMR(cm)
L_a = 2.0*10**-7*complex(math.log((D_ab*D_ca)**0.5/r_GMR),(3**0.5/2*math.log(D_ab/D_ca))) #Inductance per phase of A(H/m)
L_amH = L_a*10.0**6 #Inductance per phase of A(mH/km)
L_b = 2.0*10**-7*complex(math.log((D_bc*D_ab)**0.5/r_GMR),(3**0.5/2*math.log(D_bc/D_ab))) #Inductance per phase of B(H/m)
L_bmH = L_b*10.0**6 #Inductance per phase of B(mH/km)
L_c = 2.0*10**-7*complex(math.log((D_ca*D_bc)**0.5/r_GMR),(3**0.5/2*math.log(D_ca/D_bc))) #Inductance per phase of C(H/m)
L_cmH = L_c*10.0**6 #Inductance per phase of C(mH/km)
D_eq = (D_ab*D_bc*D_ca)**(1.0/3) #Equivalent distance(cm)
L_avg = 0.2*math.log(D_eq/r_GMR) #Average inductance per phase(mH/km)
#Result
print('Inductance of conductor a, L_a = (%.4f%.2fj) mH/km' %(L_amH.real,L_amH.imag))
print('Inductance of conductor b, L_b = (%.4f+%.2fj) mH/km' %(L_bmH.real,L_bmH.imag))
print('Inductance of conductor c, L_c = (%.4f+%.2fj) mH/km' %(L_cmH.real,L_cmH.imag))
print('Average inductance of each phase, L_avg = %.3f mH/km' %L_avg)
```

In [1]:

```
import math
#Variable declaration
D_a_a = 0.9 #Self GMD of conductor a(cm)
D_a_aa = 40.0 #Distance between conductor a & a'(cm)
D_a_b = 1000.0 #Distance between conductor a & b(cm)
D_a_bb = 1040.0 #Distance between conductor a & b'(cm)
D_aa_b = 960.0 #Distance between conductor a' & b(cm)
D_c_a = 2000.0 #Distance between conductor a & c(cm)
D_c_aa = 1960.0 #Distance between conductor a' & c(cm)
D_cc_a = 2040.0 #Distance between conductor a & c'(cm)
#Calculation
D_aa_aa = D_a_a #Self GMD of conductor a'(cm)
D_aa_a = D_a_aa #Distance between conductor a' & a(cm)
D_s1 = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD in position 1(cm)
D_s2 = D_s1 #Self GMD in position 2(cm)
D_s3 = D_s1 #Self GMD in position 3(cm)
D_s = (D_s1*D_s2*D_s3)**(1.0/3) #Equivalent self GMD(cm)
D_aa_bb = D_a_b #Distance between conductor a' & b'(cm)
D_AB = (D_a_b*D_a_bb*D_aa_b*D_aa_bb)**(1.0/4) #Mutual GMD(cm)
D_BC = D_AB #Mutual GMD(cm)
D_cc_aa = D_c_a #Distance between conductor a' & c'(cm)
D_CA = (D_c_a*D_c_aa*D_cc_a*D_cc_aa)**(1.0/4) #Mutual GMD(cm)
D_m = (D_AB*D_BC*D_CA)**(1.0/3) #Equivalent Mutual GMD(cm)
L = 0.2*math.log(D_m/D_s) #Inductance per phase(mH/km)
#Result
print('Inductance per phase, L = %.3f mH/km' %L)
```

In [1]:

```
import math
#Variable declaration
r = 6.0/1000 #Radius of conductor(m)
D_a_cc = 5.0 #Distance between conductor a & c'(m)
D_b_bb = 6.0 #Distance between conductor b & b'(m)
D_c_aa = 5.0 #Distance between conductor c & a'(m)
D_acc_bbb = 3.0 #Distance between conductor ac' & bb'(m)
D_bbb_caa = 3.0 #Distance between conductor bb' & ca'(m)
D_a_c = 6.0 #Distance between conductor a & c(m)
#Calculation
r_GMR = 0.7788*r #GMR of conductor(m)
D_a_b = (D_acc_bbb**2+((D_b_bb-D_a_cc)/2)**2)**(1.0/2) #Distance between conductor a & b(m)
D_a_bb = (D_acc_bbb**2+(D_a_cc+(D_b_bb-D_a_cc)/2)**2)**(1.0/2) #Distance between conductor a & b'(m)
D_a_aa = ((D_acc_bbb+D_bbb_caa)**2+D_c_aa**2)**(1.0/2) #Distance between conductor a & a'(m)
D_a_a = r_GMR #Self GMD of conductor a(m)
D_aa_aa = D_a_a #Self GMD of conductor a'(m)
D_aa_a = D_a_aa #Distance between conductor a' & a(m)
D_S1 = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD in position 1(m)
D_bb_b = D_b_bb #Distance between conductor b' & b(m)
D_S2 = (D_a_a*D_b_bb*D_aa_aa*D_bb_b)**(1.0/4) #Self GMD in position 2(m)
D_S3 = (D_a_a*D_a_aa*D_aa_aa*D_aa_a)**(1.0/4) #Self GMD in position 3(m)
D_S = (D_S1*D_S2*D_S3)**(1.0/3) #Equivalent self GMD(m)
D_aa_bb = D_a_b #Distance between conductor a' & b'(m)
D_aa_b = D_a_bb #Distance between conductor a' & b(m)
D_AB = (D_a_b*D_a_bb*D_aa_b*D_aa_bb)**(1.0/4) #Mutual GMD(m)
D_BC = D_AB #Mutual GMD(m)
D_c_a = D_a_c #Distance between conductor c & a(m)
D_cc_aa = D_c_a #Distance between conductor a' & c'(m)
D_cc_a = D_a_cc #Distance between conductor c' & a(m)
D_CA = (D_c_a*D_c_aa*D_cc_a*D_cc_aa)**(1.0/4) #Mutual GMD(m)
D_m = (D_AB*D_BC*D_CA)**(1.0/3) #Equivalent Mutual GMD(m)
L = 0.2*math.log(D_m/D_S) #Inductance per phase(mH/km)
#Result
print('Inductance per phase, L = %.2f mH/km' %L)
```

In [1]:

```
#Variable declaration
D_eq = 2.88 #Equilateral spacing of line(m)
#Calculation
D = D_eq/2**(1.0/3) #Distance(m)
D_13 = 2.0*D #Distance between conductor 1 & 3(m)
D_12 = D #Distance between conductor 1 & 2(m)
D_23 = D #Distance between conductor 2 & 3(m)
#Result
print('Spacing between conductor 1 & 2 to keep inductance same, D_12 = %.1f m' %D_12)
print('Spacing between conductor 2 & 3 to keep inductance same, D_23 = %.1f m' %D_23)
print('Spacing between conductor 1 & 3 to keep inductance same, D_13 = %.1f m' %D_13)
```

In [1]:

```
import math
#Variable declaration
l = 40.0 #Length of line(km)
d = 5.0/1000 #Diameter of wire(m)
D = 1.5 #Spacing between conductor(m)
h = 7.0 #Height of conductors above ground(m)
#Calculation
r = d/2 #Radius of wire(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
#Neglecting presence of ground
C_ab_1 = math.pi*e/(math.log(D/r)) #Capacitance(F/m)
C_ab_12 = C_ab_1*l*1000.0*10**6 #Capacitance(μF)
#Taking presence of ground
C_ab_2 = math.pi*e/math.log(D/(r*(1+(D/(2*h))**2)**(1.0/2))) #Capacitance(F/m)
C_ab_22 = C_ab_2*l*1000.0*10**6 #Capacitance(μF)
#Result
print('Capacitance of line neglecting presence of ground, C_ab = %.3f μF' %C_ab_12)
print('Capacitance of line taking presence of ground, C_ab = %.3f μF' %C_ab_22)
```

In [1]:

```
import math
#Variable declaration
d = 2.0/100 #Diameter of conductor(m)
D_AB = 4.0 #Spacing between conductor A & B(m)
D_BC = 4.0 #Spacing between conductor B & C(m)
D_CA = 8.0 #Spacing between conductor C & A(m)
#Calculation
r = d/2 #Radius of conductor(m)
D = 4.0 #Assuming coomon distance(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
C_A = 2*math.pi*e/(math.log(D/r)-complex(-0.5,0.866)*math.log(2))*1000.0 #Capacitance of conductor A(F/km)
C_Au = C_A*10.0**6 #Capacitance of conductor A(μF/km)
C_B = 2*math.pi*e/math.log(D/r)*1000.0 #Capacitance of conductor B(F/km)
C_Bu = C_B*10.0**6 #Capacitance of conductor B(μF/km)
C_C = 2*math.pi*e/(math.log(D/r)-complex(-0.5,-0.866)*math.log(2))*1000.0 #Capacitance of conductor C(F/km)
C_Cu = C_C*10.0**6 #Capacitance of conductor C(μF/km)
#Result
print('Capacitance of conductor A, C_A = (%.5f+%.6fj) μF/km' %(C_Au.real,C_Au.imag))
print('Capacitance of conductor B, C_B = %.6f μF/km' %C_Bu)
print('Capacitance of conductor C, C_C = (%.5f%.6fj) μF/km' %(C_Cu.real,C_Cu.imag))
```

In [1]:

```
import math
#Variable declaration
d = 2.0/100 #Diameter of conductor(m)
D_AB = 4.0 #Spacing between conductor A & B(m)
D_BC = 4.0 #Spacing between conductor B & C(m)
D_CA = 8.0 #Spacing between conductor C & A(m)
#Calculation
r = d/2 #Radius of conductor(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
D_eq = (D_AB*D_BC*D_CA)**(1.0/3) #Equivalent distance(m)
C_n = 2*math.pi*e/math.log(D_eq/r)*1000.0 #Capacitance to neutral(F/km)
C_nu = C_n*10.0**6 #Capacitance to neutral(μF/km)
#Result
print('New value of capacitance, C_n = %.5f μF/km' %C_nu)
print('\nNOTE: Changes in the obtained answer from that of textbook is due to more approximation in the textbook')
```

In [1]:

```
import math
#Variable declaration
d = 2.6 #Outside diameter of conductor(cm)
D_RY = 8.0 #Spacing between conductor R & Y(m)
D_YB = 8.0 #Spacing between conductor Y & B(m)
D_RB = 16.0 #Spacing between conductor R & B(m)
h = 13.0 #Height of conductor from ground(m)
#Calculation
r = d/2 #Radius of conductor(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
h_12 = (D_RY**2+(2*h)**2)**(1.0/2) #Height of conductor 1 & 2(m)
h_23 = h_12 #Height of conductor 2 & 3(m)
h_31 = (D_RB**2+(2*h)**2)**(1.0/2) #Height of conductor 3 & 1(m)
h_1 = 2*h #Height of transposed conductor 1(m)
h_2 = 2*h #Height of transposed conductor 2(m)
h_3 = 2*h #Height of transposed conductor 3(m)
D_eq = (D_RY*D_YB*D_RB)**(1.0/3) #Equivalent distance(m)
h_123 = (h_12*h_23*h_31)**(1.0/3) #Height(m)
h_1_2_3 = (h_1*h_2*h_3)**(1.0/3) #Height(m)
C_n = 2*math.pi*e/(math.log(D_eq*100/r)-math.log(h_123/h_1_2_3))*1000.0 #Capacitance of conductor A(F/km)
#Result
print('Capacitance per phase to neutral of a line, C_n = %.1e F/km' %C_n)
```

In [1]:

```
import math
#Variable declaration
d = 2.5 #Diameter of conductor(cm)
D = 200.0 #Distance of separation(cm)
l = 100.0 #Length of line(km)
#Calculation
r = d/2 #Radius of conductor(cm)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
D_m = (D*(3**0.5)*D*(3**0.5)*D*D)**(1.0/4) #Mutual GMD(cm)
D_s = (2*D*r)**(1.0/2) #Self GMD(cm)
C_n = 2*math.pi*e/math.log(D_m/D_s)*1000.0 #Phase-to-neutral capacitance(F/km)
C_nu = C_n*l*10.0**6 #Phase-to-neutral capacitance(μF)
#Result
print('Phase-to-neutral capacitance, C_n = %.2f μF' %C_nu)
```

In [1]:

```
import math
#Variable declaration
d = 2.5/100 #Diameter of conductor(m)
D = 5.0 #Distance of separation(m)
h = 2.0 #Height of separation(m)
#Calculation
r = d/2 #Radius of conductor(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
m = (D**2+h**2)**(1.0/2) #(m)
n = (D**2+(h*2)**2)**(1.0/2) #(m)
D_ab = (D*m)**(1.0/2) #Distance between conductor a & b(m)
D_bc = (D*m)**(1.0/2) #Distance between conductor b & c(m)
D_ca = (2*D*h)**(1.0/2) #Distance between conductor c & a(m)
D_eq = (D_ab*D_bc*D_ca)**(1.0/3) #Equivalent GMD(m)
D_s1 = (r*n)**(1.0/2) #Self GMD in position 1(m)
D_s2 = (r*h)**(1.0/2) #Self GMD in position 2(m)
D_s3 = (r*n)**(1.0/2) #Self GMD in position 3(m)
D_s = (D_s1*D_s2*D_s3)**(1.0/3) #Self GMD(m)
C_n = 2*math.pi*e/math.log(D_eq/D_s)*1000.0 #Capacitance per phase to neutral(F/km)
C_nu = C_n*10.0**6 #Capacitance per phase to neutral(μF/km)
#Result
print('Capacitance per phase to neutral, C_n = %.2f μF/km' %C_nu)
```

In [1]:

```
import math
#Variable declaration
d = 2.5/100 #Diameter of conductor(m)
V = 132.0*10**3 #Line voltage(V)
f = 50.0 #Frequency(Hz)
h = 4.0 #Height(m)
H = 8.0 #Height of separation(m)
D_1_33 = 7.0 #Distance between conductors 1 & 3'(m)
D_1_22 = 9.0 #Distance between conductors 1 & 2'(m)
D_1_11 = 8.0 #Distance between conductors 1 & 1'(m)
D_1 = 1.0 #Distance(m)
#Calculation
r = d/2 #Radius of conductor(m)
e = 1.0/(36*math.pi)*10**-9 #Constant ε_0
D_12 = (h**2+D_1**2)**(1.0/2) #Distance between conductors 1 & 2(m)
D_122 = (h**2+D_1_11**2)**(1.0/2) #Distance between conductors 1 & 2'(m)
D_111 = (D_1_11**2+D_1_33**2)**(1.0/2) #Distance between conductors 1 & 1'(m)
D_1_2 = (D_12*D_122)**(1.0/2) #Mutual GMD(m)
D_2_3 = (D_12*D_122)**(1.0/2) #Mutual GMD(m)
D_3_1 = (D_1_33*D_1_11)**(1.0/2) #Mutual GMD(m)
D_eq = (D_1_2*D_2_3*D_3_1)**(1.0/3) #Equivalent GMD(m)
D_s1 = (r*D_111)**(1.0/2) #Self GMD in position 1(m)
D_s2 = (r*D_1_22)**(1.0/2) #Self GMD in position 2(m)
D_s3 = (r*D_111)**(1.0/2) #Self GMD in position 3(m)
D_s = (D_s1*D_s2*D_s3)**(1.0/3) #Self GMD(m)
C_n = 2*math.pi*e/math.log(D_eq/D_s) #Capacitance per phase to neutral(F/m)
X_cn = 1/(2.0*math.pi*f*C_n) #Capacitive reactance to neutral(ohms/m)
V_ph = V/(3**0.5) #Phase voltage(V)
I_charg = V_ph/X_cn*1000.0 #Charging current per phase(A/km)
#Result
print('Capacitive reactance to neutral, X_cn = %.2e ohms/m' %X_cn)
print('Charging current per phase, I_charg = %.3f A/km' %I_charg)
```

In [1]:

```
import math
#Variable declaration
d = 0.8/100 #Diameter of conductor(m)
f = 50.0 #Frequency(Hz)
D_a_b = 5.0 #Distance between conductors a & b(m)
D_b_c = 5.0 #Distance between conductors b & c(m)
D_c_a = 8.0 #Distance between conductors c & a(m)
l = 25.0 #Length of line(km)
#Calculation
r = d/2 #Radius of conductor(m)
e = 8.854*10**-12 #Constant ε_0
D_e = (D_a_b*D_b_c*D_c_a)**(1.0/3) #Equivalent GMD(m)
L = 2*((1.0/4)+math.log(D_e/r))*10**-4 #Inductance(H/km)
X_L = 2*math.pi*f*L #Inductive reactance per km(ohms)
C = math.pi*e/math.log(D_e/r) #Capacitance(F/m)
C_l = C*1000.0*l #Capacitance for entire length(F)
C_lu = C_l*10.0**6 #Capacitance for entire length(μF)
X_c = 1/(2.0*math.pi*f*C_l) #Capacitive reactance to neutral(ohm)
X_ck = X_c/1000.0 #Capacitive reactance to neutral(kilo-ohm)
#Result
print('Inductive reactance of the line per kilometer per phase, X_L = %.3f ohm' %X_L)
print('Capacitance of the line, C = %.3f μF' %C_lu)
print('Capacitive reactance of the line, X_c = %.1f kilo-ohm' %X_ck)
print('\nNOTE: ERROR: Change in obtained answer from that of textbook due to wrong substitution in finding Capacitance')
```

In [1]:

```
import math
#Variable declaration
V = 250.0 #Line voltage(V)
f = 50.0 #Frequency(Hz)
D = 1.5 #Distance of separation(m)
d = 1.5/100 #Diameter of conductor(m)
l = 50.0 #Length of line(km)
#Calculation
#Case(i)
r = d/2 #Radius of conductor(m)
e = 8.854*10**-12 #Constant ε_0
C = math.pi*e/math.log(D/r) #Capacitance(F/m)
C_l = C*1000.0*l #Capacitance for entire length(F)
C_lu = C_l*10.0**6 #Capacitance for entire length(μF)
#Case(ii)
I_charg = 2.0*math.pi*f*C_l*V*1000.0 #Charging current(mA)
#Result
print('Case(i) : Capacitance of the line, C = %.3f μF' %C_lu)
print('Case(ii): Charging current, I_charg = %.2f mA' %I_charg)
```

In [1]:

```
import math
#Variable declaration
d_1 = 6.0 #Distance between conductor 1 & 2(m)
d_2 = 6.0 #Distance between conductor 2 & 3(m)
d_3 = 12.0 #Distance between conductor 3 & 1(m)
dia = 1.24/100 #Diameter of conductor(m)
l = 100.0 #Length of line(km)
#Calculation
r = dia/2 #Radius of conductor(m)
e = 8.854*10**-12 #Constant ε_0
d = (d_1*d_2*d_3)**(1.0/3) #Distance(m)
C = 2*math.pi*e/math.log(d/r) #Capacitance(F/m)
C_l = C*1000.0*l #Capacitance for entire length(F)
C_lu = C_l*10.0**6 #Capacitance for entire length(μF)
#Result
print('Capacitance of the line, C = %.3f μF' %C_lu)
```

In [1]:

```
import math
#Variable declaration
d = 2.0 #Spacing between conductors(m)
dia = 1.25/100 #Diameter of conductor(m)
#Calculation
r = dia/2 #Radius of conductor(m)
e = 8.854*10**-12 #Constant ε_0
C = 2*math.pi*e/math.log(d/r) #Capacitance(F/m)
C_u = C*1000*10.0**6 #Capacitance for entire length(μF/km)
#Result
print('Capacitance of each line conductor, C = %.4f μF/km' %C_u)
```