# Chapter 2 Electric Fields¶

## Example 2.8.5 pgno:65¶

In [1]:
#Calculate the maximum field at the sphere surface
#Calulating Field at surface E based on figure 2.31 and table 2.3
from math import pi

Q1 = 0.25
e0 = 8.85418*10**-12 #Epselon nought
RV1= ((1/0.25**2)+(0.067/(0.25-0.067)**2)+(0.0048/(0.25-0.067)**2))
RV2= ((0.25+0.01795+0.00128)/(0.75-0.067)**2)
RV= RV1+RV2
E = (Q1*RV)/(4*pi*e0*10**10)
print"Maximum field = ",E,"V/m per volt"
#Answers vary due to round off error

Maximum field =  4.20643156401 V/m per volt


## Example 2.8.6 pgno:66¶

In [2]:
#calculation based on figure 2.32
from math import log
from math import pi

#(a)Charge on each bundle
print"Part a\t"
req = (0.0175*0.45)**0.5
print"Equivalent radius =  %f m "%req
V = 400*10**3          #Voltage
H = 12.                #bundle height in m
d = 9.                 #pole to pole spacing in m
e0 = 8.85418*10**-12   #Epselon nought
Hd = ((2*H)**2+d**2)**0.5#2*H**2 + d**2
Q = V*2*pi*e0/(log((2*H/req))-log((Hd/d)))
q = Q/2
print"Charge per bundle = %f uC/m "%Q #micro C/m
print"Charge per sunconducter = %f uC/m "%q #micro C/m

#(b part i)Maximim & average surface feild
print"\tPart b"
print"\tSub part 1\t"
R = 0.45                 #conductor to subconductor spacing
MF = (q/(2*pi*e0))*((1/r)+(1/R)) # maximum feild
print"Maximum feild = %f V/m \t"%MF
MSF = (q/(2*pi*e0))*((1/r)-(1/R)) # maximum surface feild
print"Maximum feild = %f V/m \t"%MSF
ASF = (q/(2*pi*e0))*(1/r) # Average surface feild
print"Maximum feild = %f V/m \t"%ASF

#(b part ii) Considering the two sunconductors on the left
print"\tSub part 2\t"
#field at the outer point of subconductor #1
drO1 = 1/(d+r)
dRrO1 = 1/(d+R+r)
EO1 =  MF -((q/(2*pi*e0))*(drO1+dRrO1))
print"EO1 = %f V/m \t"%EO1
#field at the outer point of subconductor #2
drO2 = 1/(d-r)
dRrO2 = 1/(d-R-r)
EO2 =  MF -((q/(2*pi*e0))*(dRrO2+drO2))
print"EO2 = %f V/m \t"%EO2

#field at the inner point of subconductor #1
drI1 = 1/(d-r)
dRrI1 = 1/(d+R-r)
EI1 =  MSF -((q/(2*pi*e0))*(drI1+dRrI1))
print"EI1 = %f V/m \t"%EI1
#field at the inner point of subconductor #2
drI2 = 1/(d+r)
dRrI2 = 1/(d-R+r)
EI2 =  MSF -((q/(2*pi*e0))*(dRrI2+drI2))
print"EI2 = %f V/m \t"%EI2

#(part c)Average of the maximim gradient
print"\tPart c\t"
Eavg = (EO1+EO2)/2
print"The average of the maximum gradient = %f V/m \t"%Eavg

#Answers might vary due to round off error

Part a
Charge per bundle = 0.000005 uC/m
Charge per sunconducter = 0.000002 uC/m
Part b
Sub part 1
Maximum feild = 2607466.950170 V/m
Maximum feild = 2412255.520745 V/m
Maximum feild = 2509861.235457 V/m
Sub part 2
EO1 = 2597956.835582 V/m
EO2 = 2597429.477437 V/m
EI1 = 2402709.212726 V/m
EI2 = 2402258.056301 V/m
Part c
The average of the maximum gradient = 2597693.156510 V/m


## Example 2.8.7 pgno:69¶

In [3]:
#Electric feild induced at x
from math import pi

e0 = 8.85418*10**-12 #Epselon nought
q = 1 # C/m
C = (q/(2*pi*e0))
#Based on figure 2.33
E = C-(C*(1./3.+1./7.))+(C*(1+1./5.+1./9.))+(C*(1./5.+1./9.))-(C*(1./3.+1./7.))
print"Electric Feild = %f V/m \t"%E
#Answers might vary due to round off error

Electric Feild = 30015596280.410564 V/m


## Example 2.8.8 pgno:70¶

In [5]:
#Calculate the volume of the insulator
from math import e
from math import pi

V = 150*(2)**0.5
Ebd = 50
T = V/Ebd
print"\nThickness of graded design= %f cm "%T
#Based on figure 2.24
r = 2 # radius of the conductor
l = 10 #length of graded cylinder; The textbook uses 10 instead of 20
zr = l*(T+r)
print"Curve = %f cm**2 "%zr
V1 = 4*pi*zr*(zr-r)
print"V1 = %f cm**3 "%V1 #Unit is wrong in the textbook
#Thickness of regular design as obtained form Eq.2.77
pow = V/(2*Ebd)
t = 2*(e**pow-1)
print"Thickness of regular design = %f cm "%t
#Volume of regular design V2
V2 = pi*((2+t)**2-4)*10
print"V2 = %f cm**3 "%round(V2,2)#unit not mentioned in textbook

#Answers may vary due to round off error

Thickness of graded design= 4.242641 cm
Curve = 62.426407 cm**2
V1 = 47402.906725 cm**3
Thickness of regular design = 14.684289 cm
V2 = 8619.450000 cm**3


## Example 2.8.11 pgno:75¶

In [6]:
#Calculate the potential within the mesh
#Based on figure 2.38(b)
#equations are obtained using Eq.2.46
import numpy
from numpy import linalg

A1 = 1/2*(0.54+0.16)
A2 = 1/2*(0.91+0.14)
S = numpy.matrix([[0.5571, -0.4571, -0.1],[-0.4751, 0.828, 0.3667],[-0.1, 0.667, 0.4667]])
#By obtaining the elements of the global stiffness matrix(Sadiku,1994)
#and by emplying the Eq.2.49(a)
S1 = numpy.matrix([[1.25, -0.014],[-0.014, 0.8381]])
S2 = numpy.matrix([[-0.7786, -0.4571],[-0.4571, -0.3667]])
Phi13 = numpy.matrix([[0], [10]])
val1 = S2*Phi13
Phi24 = val1/S1
print"The values of Phi2 and Phi4 are: \n",-Phi24
#Answers may vary due to round of error

The values of Phi2 and Phi4 are:
[[   3.6568     -326.5       ]
[-261.92857143    4.37537287]]