kicad2ems.mom25d.via¶
mom25d.via - layered-media kernels for vertical (via) currents
Via model --------- A via is a thin wire (radius a) on the axis (xv, yv). Its
current is constant within each 'chain' - the run of dielectric layers between
two interfaces where the via touches metal (pad, plane, ground, PEC cover).
Charge therefore only appears at chain ends, and at a pad it is spread uniformly
over the 'fan' of triangles around the via vertex, so it can cancel the pad's
own charge exactly (current continuity at the junction).
Spectral kernels (TM transmission-line network, unit shunt-current source at
interface s:
voltages V(z_i | z_s) at all interfaces; kz_j, eps_j per layer). Derived from
Maxwell with the exp(+jwt), exp(-j k.rho) conventions used throughout:
via segment in layer j (unit current, +z) -> E_t on interface k :
E_t = grad_t S
S~_{k,j}(kr) = [V(z_j|z_k) - V(z_{j-1}|z_k)] / kz_j^2
reaction between via segments in layers i (obs) and j (src):
P~_ij = kr^2/(kz_i^2 kz_j^2) [dV_i(z_j) - dV_i(z_{j-1})]
+ delta_ij j w mu0 h_j/(kr^2 - k_j^2)
dV_i(z_s) = V(z_i|z_s) - V(z_{i-1}|z_s)
(zero if z_s is a PEC interface)
(the delta(z-z') self term cancels the constant part of the second term
exactly).
For numerics the point end charges are taken out spectrally:
D~ = S~ - (1/jw) sum_ends div_e G~_q(k, k_e)
(smooth; identically zero in a homogeneous stack)
R~ = P~ - (1/jw) sum_ends sum_ends' div div' G~_q -
homogeneous K0 part
and the end charges are put back as fan-distributed charges through the ordinary
G_q machinery.
- class kicad2ems.mom25d.via.TMNetwork(stack, kr, w)[source]¶
V[s][i](kr): TM voltage at interface i (0..N) for a unit shunt current source at interface s (any interface but a PEC plane of the stack: with bottom='open', interface 0 too).
- class kicad2ems.mom25d.via.Table1D(rho_coarse, vals, rho_max, nfine=8192)[source]¶
Spline-resampled radial kernel(s) (vals: (n,) or (n, m) on rho_coarse) on a uniform grid, with direct-index linear interpolation (no search).
- class kicad2ems.mom25d.via.ViaKernels(f, stack, spans, interfaces, rho_max, nrho=200)[source]¶
Per-frequency via kernels for a set of chain spans [(k_bot, k_top), ...] and metal interfaces. D[(k, span)] : Table1D of the smooth via->interface kernel D(rho) R(span_m, span_n, rho) : smooth via-via reaction remainder at distances rho homog(span_m, span_n, rho) : analytic K0 part
- kicad2ems.mom25d.via.bessel_sum(n, rho, kr, W)[source]¶
sum_k J_n(rho_i kr_k) W[s, k] (n = 0, 1, 2): (nspec, len(rho)), as j0_sum: the real part of the contour in the compiled core without the Bessel matrix, the lifted part NumPy's.
- kicad2ems.mom25d.via.chain_ends(k_bot, k_top)[source]¶
[(interface, divergence)] of a +z unit-current chain (current leaves bottom, arrives top).
- kicad2ems.mom25d.via.hankel(spec, kr, dk, rho)[source]¶
(1/2pi) int spec(kr) J0(kr rho) kr dkr for an array of rho; spec may be (npts,) or (nspec, npts).
- kicad2ems.mom25d.via.j0_sum(rho, kr, W)[source]¶
sum_k J0(rho_i kr_k) W[s, k]: (nspec, len(rho)). The compiled core sums the real part of the contour without the Bessel matrix (OpenMP); the lifted part, complex kr, is NumPy's (jn).