kicad2ems.mom25d.multilayer

mom25d.multilayer - multilayer stackups for the 2.5D planar MoM solver
(sim.Simulation):

  * Arbitrary stack of dielectric layers above a PEC ground, open (air) or PEC
    top cover (microstrip, embedded microstrip, stripline, offset/broadside
    stripline ...); or the whole stack with a half-space below too
    (bottom='open'): no infinite ground, metal on interface 0 as well (a
    board's every copper layer, its planes meshed, radiation above and below)
  * Layered-media Green's functions from a transmission-line network in the
    spectral domain, for source and observation on the same or different
    interfaces (MPIE "formulation C", exact for horizontal currents):
        G_A  = V_h / (j w)                 G_q = j w (V_e - V_h) / kr^2
    same interface: the 1/rho singular part (coefficients cA, cq) is
    subtracted spectrally and integrated analytically; the remainder is
    tabulated per frequency.
  * Non-uniform tensor mesh: n cells across narrow strips, dmax along them
  * The run log (timings and notes).

Time convention exp(+j w t).
class kicad2ems.mom25d.multilayer.GreenTableML(f, stack, o, s, rho_max, nrho=260, nfine=8192, K=None, nq=8, cross_sing=False, image_sing=None)[source]
Tabulated smooth parts of the layered-media kernels between interfaces o and
s:
    G_A = cA/rho + A_rest(rho),  G_q = cq/rho + Q_rest(rho)   (cA = cq = 0
                                 if o != s)
Sommerfeld integrals along a contour lifted into the upper-half kr plane
(clear of surface-wave / parallel-plate poles and the branch point).
classmethod batch(f, stack, pairs, rho_max, nrho=260, nfine=8192, K=None, nq=8)[source]
The tables of pairs [(o, s, cross_sing, image_sing)] at f, as each
alone, their Hankel transforms one call: every pair's contour and rho
are the same at f, so the Bessel functions on them (most of a table's
time: 0.15 s of 0.16 a pair on a 6-layer via model's 21) once, not
once a pair.
extracted()[source]
[(d, cA, cq)]: the parts taken out of the tables, cA / sqrt(rho^2 +
d^2) and cq / sqrt(rho^2 + d^2): the 1/rho singularity (same interface)
and its nearest image, or the near-singular cross-layer part.
total(rho)[source]
Full G_A, G_q at distances rho (the extracted parts added back; 0 for
them at rho = d = 0).
class kicad2ems.mom25d.multilayer.Layer(h, er, tand=0.0, name=None, fref=None)[source]
A dielectric layer: h (m), er and tand. fref (Hz): a wideband
(Djordjevic-Sarkar) layer, er and tand holding at fref; None: both constant
over frequency.
er_at(f)[source]
The complex permittivity at f (Hz).
property er_c[source]
The complex permittivity (at fref, for a wideband layer:
LayerStack.at for another frequency).
class kicad2ems.mom25d.multilayer.LayerStack(layers, top='open', top_er=1.0, bottom='pec', bottom_er=1.0, pec=())[source]
Dielectric layers listed bottom -> top, interface 0 at z = 0 their bottom
surface. Interface k (k = 1..N) is the top surface of layer k.
top='open':    half-space of permittivity top_er above layer N (metal
               allowed on 1..N)
top='pec' :    PEC cover on interface N (metal allowed on 1..N-1)  ->
               stripline-type stacks
bottom='pec' : a PEC ground at z = 0 (interface 0 is the ground; the
               default)
bottom='open': a half-space of permittivity bottom_er below layer 1, metal
               allowed on interface 0 too
pec          : interfaces (1..N-1) that are PEC planes inside the stack: no
               metal on them, and what is above one is decoupled from what
               is below it (two stacks in one: each sees the plane as its
               ground or its cover). A via through such a plane couples
               them (frill.py), and so do its openings (slots.py); 0 or N
               too where the stack is open there (a ground with air beyond
               it).
apart(a, b)[source]
A PEC plane of the stack lies between interfaces a and b (or one of
them is one).
at(f)[source]
The stack at f (Hz): itself if no layer is wideband, else a copy
whose layers hold their permittivity at f (Layer.er_at) as constants.
Everything built for one frequency (the Green tables, via kernels, far
field) takes this, so the rest of mom25d is unchanged by dispersion.
property dispersive[source]
Any layer is wideband (Layer.fref): the stack's permittivities depend
on the frequency.
eps(j)[source]
Permittivity of layer j (1..N); j = 0 the half-space below, j = N + 1
the one above.
eps_sum(k)[source]
permittivity below + above interface k (sets the 1/rho singular
coefficient).
is_pec(k)[source]
Interface k is a PEC plane of the stack itself (the ground, a cover,
a plane inside it), not meshed metal.
nearest_discontinuity(k)[source]
Distance from interface k to the closest interface with a
permittivity step, or a ground.
reaches(p, k)[source]
The field of a hole in the PEC plane p reaches interface k: k is no
PEC plane, and none lies between.
side(k)[source]
Which part of the stack interface k is in: the number of internal PEC
planes below it. Interfaces of different parts do not see each other.
spectral(kr, w, o, s)[source]
Spectral G_A(kr), G_q(kr) for observation on interface o, source on
interface s.
transfer(kr, w, p, k, mode='e')[source]
The voltage at interface k of the network driven by a unit voltage at
the PEC plane p in place of its short (an aperture in the plane:
frill.py), k on either side of it; 1 at p itself, 0 at another PEC plane
or beyond one.
voltage(kr, w, o, s, mode)[source]
Voltage at interface o for a unit shunt current source at interface
s, in the TM ('e') or TE ('h') transmission-line network of the stack.
Zero at a PEC interface (either end), and across one.
class kicad2ems.mom25d.multilayer.RunLog(verbose=True)[source]
Collects stage timings and notes; printed live when verbose.
kicad2ems.mom25d.multilayer.djordjevic_sarkar(er, tand, fref, f)[source]
The Djordjevic-Sarkar (wideband Debye) relative permittivity eps' - j
eps'' at f (Hz), equal to er (1 - j tand) at fref: eps_inf + d_eps / (m2 -
m1) log10((w2 + j w) / (w1 + j w)), as kicad2ems's FDTD solvers fit it
(their wideband dielectric), here exact at every frequency.
kicad2ems.mom25d.multilayer.stripline_z0_cohn(w, b, er)[source]
Exact Z0 of a zero-thickness strip centred between ground planes spaced
b.