In [2]:
from numpy import *
%pylab inline

Populating the interactive namespace from numpy and matplotlib


### P2 / P3¶

In [4]:
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)

2.51646060522


### P5¶

In [5]:
#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)) )

Characteristic Impedance: 5.16e+01 ohms
Transmission Velocity: 1.99e+08 m/s
Length / ns: 199.42 mm

In [10]:
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)')

Out[10]:
<matplotlib.text.Text at 0x1137c3e10>
In [13]:
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)")

Out[13]:
<matplotlib.text.Text at 0x113690f10>

### P6¶

In [11]:
#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))

In standard coax cable at 10 MBps, a bit is 2.00e+01 meters


In [ ]: