from numpy import *
%pylab inline
def skin_depth(nu,mu,sigma):
#Skin depth for frequency nu, permeability mu, and conductivity sigma
return 1/sqrt(pi*nu*mu*sigma)
mu0 = 4*pi*1e-7
print skin_depth(1e4,mu0,4)
#coaxial cable
def L(ri,ro):
#inductance per unit length for coax
return mu0/(2*pi)*log(ro/ri)
def C(ri,ro,eps):
#capacitance per unit length for coax
return 2*pi*eps/log(ro/ri)
def v(L,C):
#velocity for inductance/length L and capacitance/length C
return 1/sqrt(L*C)
def Z(L,C):
#characteristic inductance
return sqrt(L/C)
eps0 = 8.854e-12
ro = 1.48e-3 #outer radius (m)
ri = .406e-3 #inner radius (m)
eps = 2.26 * eps0
print "Characteristic Impedance: %.2e ohms"%( Z(L(ri,ro),C(ri,ro,eps)) )
print "Transmission Velocity: %.2e m/s"%( v(L(ri,ro),C(ri,ro,eps)) )
print "Length / ns: %.2f mm"%( 1e3*1e-9*v(L(ri,ro),C(ri,ro,eps)) )
ri = linspace(.1e-3,.12e-3,100)
ro_new = (.030/2)/39.3 #new outer radius, meters
x_scale = lambda x: 1e3*x
plot(x_scale(ri), Z(L(ri,ro_new),C(ri,ro_new,eps)) )
plot([x_scale(ri[0]),x_scale(ri[-1])],[50,50])
grid(True)
xlabel('New inner diameter (mm)')
def wavelength(v,nu):
#wavelength for frequency nu and speed v
return v/nu
V = 2e8
nus = linspace(5e10,1e11,100)
plot( 1e-9*nus, wavelength(V,nus) )
plot( [1e-9*nus[0],1e-9*nus[-1]], [2*1.48e-3, 2*1.48e-3])
xlabel("frequency (GHz)")
ylabel("wavelength (m)")
#physical sizes of bits in coax cable
baud = 10e6 #bps
v = 2e8 #m/s
def bit_size(v,baud):
return v/baud
print "In standard coax cable at 10 MBps, a bit is %.2e meters"%(bit_size(v,baud))