from __future__ import division
from numpy import pi
N=400
a=4*10**-4
MUo=4*pi*10**-7
MUr=800
l=0.3
L=(MUo*MUr*a*N**2)/l
print "Self inductance of the coil=%.3f H"%(L)
P0=8.854*10**-12
Pr1=5.5
d1=10**-3
b1=d1/Pr1
Pr2=2.2
d2=10**-3
b2=d2/Pr2
Pr3=1.5
d3=10**-3
b3=d3/Pr3
A=100*10**-4
C=P0*A/(b1+b2+b3)
V=5000
Q=C*V*10**6
print "stored charge in the capacitor=%.2f coulombs"%(Q)
D=Q/A
D=146*10**-6
g1=D*10**-3/(P0*Pr1)
print "potential gradient g1=%.2f kV/m"%(g1)
g2=D*10**-3/(P0*Pr2)
print "potential gradient g2=%.2f kV/m"%(g2)
g3=D*10**-3/(P0*Pr3)
print "potential gradient g3=%.2f kV/m"%(g3)
from math import log10
a=0.5/2
b=0.25+0.4
Pr=4.5
C=(0.024*Pr)/(log10(b/a))
C_total=300*C
print "capacitance of the cable=%.2f uF"%(C_total)