Example #1
0
import scipy.constants as const
import scipy.optimize  as opt
import numpy           as np
import pum.algorithms  as alg
from pum.lines import *
from pum.net import *
mu  = 1
eps = 2.56
b   = 2.8 * const.milli 
Z0e = 60
Z0o = 40

modke = Z0e / ( 29.976 * const.pi * np.sqrt( mu / eps))
qe = np.exp( - const.pi * modke)
ke = np.sqrt( qe) * ( ( alg.n_fun( qe) / alg.d_fun( qe)) ** 2)
modko = Z0o / ( 29.976 * const.pi * np.sqrt( mu / eps))
qo = np.exp( - const.pi * modko)
ko = np.sqrt( qo) * ( ( alg.n_fun( qo) / alg.d_fun( qo)) ** 2)

modtest = 2.578092113348 / 1.612441348720
qtest = np.exp( -const.pi * modtest)
ktest = np.sqrt( qtest) * ( ( alg.n_fun( qtest) / alg.d_fun( qtest)) ** 2)
print 'ktest**2 = {}' .format( ktest**2)
print 'ke = {}; ko = {}' .format( ke, ko)

w = ( 2 * b / const.pi) * np.arctanh( np.sqrt( ke * ko))
s = ( 2 * b / const.pi) * np.arctanh( np.sqrt( ke / ko)) - w

print 'w = {} mm; s = {} mm' .format( w / const.milli, s / const.milli)
print '(Z0e, Z0o) = {}' .format( stripline_coupled( w, s, b, 0, mu, eps))
Example #2
0
from pum.net import *

mu  = 1
eps = 2.56
b   = 2.8 * const.milli 
C   = 13.0
Z0  = 50
f0  = 1.34 * const.giga

k = 10 ** ( - np.abs(C) / 20)
print 'k = {}' .format( k)
Z0e = Z0 * np.sqrt( ( 1 + k) / ( 1 - k))
Z0o = Z0 * np.sqrt( ( 1 - k) / ( 1 + k))
print '(Z0e, Z0o) = {}; {}' .format( Z0e, Z0o)


modke = Z0e / ( 29.976 * const.pi * np.sqrt( mu / eps))
qe = np.exp( - const.pi * modke)
ke = np.sqrt( qe) * ( ( alg.n_fun( qe) / alg.d_fun( qe)) ** 2)
modko = Z0o / ( 29.976 * const.pi * np.sqrt( mu / eps))
qo = np.exp( - const.pi * modko)
ko = np.sqrt( qo) * ( ( alg.n_fun( qo) / alg.d_fun( qo)) ** 2)

w = ( 2 * b / const.pi) * np.arctanh( np.sqrt( ke * ko))
s = ( 2 * b / const.pi) * np.arctanh( np.sqrt( ke / ko)) - w

lamb = const.c / ( np.sqrt(eps) * f0)
print 'lambda = {}; lambda/4 = {}' .format( lamb, lamb / 4)
print 'w = {} mm; s = {} mm' .format( w / const.milli, s / const.milli)
print '(Z0e, Z0o) = {}' .format( stripline_coupled( w, s, b, 0, mu, eps))
Example #3
0
import scipy.optimize  as opt
import numpy           as np
import pum.algorithms  as alg
from pum.lines import *
from pum.fdm import *

mu  = 1
eps = 2.56
b   = 2.8 * const.milli 
Z0  = 50
t   = 0.15 * const.milli

kkp = Z0 / ( 29.976 * const.pi * np.sqrt( mu / eps))
modk = 1 / kkp
q = np.exp( - const.pi * modk)
k = np.sqrt( q) * ( ( alg.n_fun( q) / alg.d_fun( q)) ** 2)
w = ( 2 * b / const.pi) * np.log( ( 1 / k) + np.sqrt( ( 1 / k ** 2) - 1))
a = 10 * b
print 'w = {} mm' .format( w / const.milli)

strip = struct( a, b, 500, 50, mu, eps)
strip.add_plane( 0.0, 0.0, 0.0, 2*b, 0.0)
strip.add_plane( 0.0,   b, 2*a,   b, 0.0)
strip.add_plane(   a,   b,   a,  -b, 0.0)
strip.add_plane(  -a, 0.0,   a, 0.0, 0.0)

strip.add_rect( w, t, a / 2, b / 2, 1.0)
strip.init()
#strip.plot()
print 'k1e-7 = {}' .format( strip.liebmann_quater( 1e-7))
print 'Z0 = {}' .format( strip.impedance())