kicad2ems.mom25d.sides¶
mom25d.sides - thick copper's sides as vertical plates (thickness 'sides';
experimental)
A sheet carries a trace's current and charge on one face; thick copper also on
its sides. A side holds its charge in the medium beside the copper (the air over
a microstrip), faces the next copper across a gap, and carries part of the
current along the trace: with that current the line's inductance falls as its
capacitance in air rises, and the effective permittivity falls (a 2D Laplace
check, w 0.4 mm on 0.21 mm FR4, t 35 um: sheet 3.391, solid 3.289, sheet and
sides 3.318; the sides' charge without their current 3.454, the wrong way).
Every boundary edge of a layer's mesh that faces copper of the same layer within
s_max (None: every boundary edge), or with wide: of copper narrower than wide
(thickness 'mixed'), stands up as a plate the copper's thickness t
high, into the layer the copper grows into (fdtd.thick: up; the board's lowest
copper down). A plate is two triangles, (a0, b0, b1) and (a0, b1, a1) (0 on the
sheet, 1 at its top), with RWG functions in 3D, and one cell: its charge the
same on both. Its functions: the fold (the sheet's boundary triangle to the
plate) and the vertical edge shared with the next plate along the boundary
(the current along the side), each with its share of the diagonal's current
(Sides._functions). In mixed precision the solver takes the verticals as
loops (Sides.loops), which keeps the complex64 LU a good preconditioner.
Their blocks: the MPIE's two parts with the layered tables at the horizontal
distance on 3 x 3 points, one point each for triangles more than FAR sizes
apart (a vertical current's own smooth part left out), and for the pairs near
each other (same layer) the static parts in
3D exactly (pcbqs.panels3d's analytic source integral) in place of the rule's:
mu0 / (4 pi R) for the vector potential, for the charge 1 / (2 pi eps0 eps_sum
R) where one of the two is on the interface, (1 / (4 pi eps0 eps1)) (1/R + G/R')
between two plates (eps1 the plates' medium, eps2 the other side, G = (eps1 -
eps2) / (eps1 + eps2), R' to the image across the interface). A fold's half on
the sheet is an RWG half there: with the sheet's triangles, the vias and the
holes it is the strips' (Sides.strip_part, Sides.virtual).
- class kicad2ems.mom25d.sides.Sides(sim, t, up, s_max=None, wide=None, gaps=None)[source]¶
The plates of a Simulation's mesh and their functions. t: {interface: copper thickness (m)}, up: {interface: True (the plate above the sheet) | False (below)}, s_max (m) or None (every boundary edge); wide (m): also the edges of copper narrower than this (thickness 'mixed').- across(sim, k, seg, d, tol=0.02)[source]¶
(functions, weights): the current along the sides across the cut line seg on interface k, in the direction d (its normal): through the vertical section of each plate the line crosses (at its end node, or inside it where the cut's end node is not the copper's edge: on boards a sliver inside, 0.25 um, the plate's run across), within tol x the cut's length of its ends. A half alpha (r - v) through a straight section: alpha l ((r_mid - v) . n), n the section's normal in the plate.
- blocks(sim, f)[source]¶
(Bw (Ne, N), Cw (N, N), QF (len(sim.F), N)) at f: the sheet edges with the sides' functions, the functions with each other, and the potential integral of each function's charge over each via fan triangle (their coupling: with sim.dF, / jw; the plates' charge). The Green tables are sim.tables (sim.green_tables(f), as the strips' blocks); the sums in the compiled core (sides_blocks). A fold's half on the sheet with the sheet's triangles: the strips' operator's (strip_part).
- gram(sim)[source]¶
int f_m . f_n dS between the sides' functions and every function they share a triangle with (theirs, and the sheet's edges on a fold's sheet triangle): sparse N x N (N = Ne + Nv, the sides' functions the last of the via unknowns), the edges' own block left out (gram_matrix has it). For the copper's surface impedance on the plates (Zs times this): their current had been lossless, so a trace's edge current, which the plates carry, had no loss (an 11 mm 50 ohm microstrip at 10 GHz over the ideal ground: 0.033 dB, now 0.066, against the strip's 0.072 of Hammerstad and Jensen's 0.097 by Wheeler's rule). Each function's half on a triangle is alpha (r - v) (3D on a plate), the sheet's a r - b (rwg's Aal, Bx, By); the moments on the 3-point rule, exact for these quadratics.
- loops(sim)[source]¶
W (N x N, sparse; nonzero in the verticals' columns only, on the other unknowns' rows): T = I + W makes each vertical a loop (its charge on its plate and on the next taken off by their folds, the folds' charge on the sheet carried by the sheet's edges around their node). A plate's own functions are charge-dominated (its triangles t high), their loops lost below that in the equilibrated matrix: rf_meander at 0.5 GHz had cond 1.4e9 (sheets 3.5e7) and took 84 complex64-LU-preconditioned GMRES iterations (sheets 30); in the loops 2.8e8 and 21. (A loop keeps no charge in Z: the folds' sheet halves are the strips' operator's, strip_part.)
- near(sim)[source]¶
Geometry only, once: the static corrections of the near pairs at the observers' level, (dM1, dMx, dMy, dMz) for the vector potential (mu0 / 4 pi in) and per layer (X1, X2, X3) for the charge (x the layer's cq, 1 / (4 pi eps0 eps1), G / (4 pi eps0 eps1)): the values of one (Nobs, N) pattern (ptr, functions).
- strip_part(sim)[source]¶
((Ne + plates) x plates) at the strips' operator's frequency (sim.fast.setup's): the edges and the folds' sheet halves (rows) with the folds' sheet halves (columns), as the strips' operator has the edges with each other.