kicad2ems.pcbqs.peec

Surface-charge PEEC extension of MQS in a homogeneous dielectric.

Branch incidence A is positive at the branch's starting node. With exp(+jwt),
    Z i = A.T P q,   A i + jw q = 0.
P is a Galerkin coefficient-of-potential matrix (volts per coulomb), referenced
to infinity. A sparse loop/tree basis keeps P out of the loop equations. The
electrostatic equilibrium is separated and the tree correction scaled by jw:
this avoids both 1/w ill-conditioning and subtracting almost equal currents
to recover a small charge at low frequency.
kicad2ems.pcbqs.peec.capacitance_matrix(model)[source]
Maxwell C (F), conductor node labels, terminal -> conductor map.

A conductor is a connected component of copper and vias; lumped elements
do not merge conductors. Potentials are relative to infinity, so row sums
need not vanish. For floating differential capacitance enforce zero total
charge, rather than grounding one conductor to infinity.
kicad2ems.pcbqs.peec.charge_nodes(model)[source]
Face sheets: the charge unknowns -> circuit nodes, as a
sparse (n_charge, n_nodes) incidence. None without face sheets (a charge per
circuit node).
kicad2ems.pcbqs.peec.electric_field(model, result, fi, pts, chunk=100000)[source]
Coulomb E (V/m) at off-surface points (m), exact for each constant
triangle charge density. No inductive -jw A contribution is included.
The edge integrals give tangential E and the solid angle gives normal E.
kicad2ems.pcbqs.peec.node_potential(model)[source]
The circuit nodes' coefficients of potential, and the charge's spread
over each node's copies.

With face sheets a node's charge is free to move between its copies (both
faces): they are one conductor at one potential. So for node charges q,
the copies hold Pc^-1 Bn v with Bn^T Pc^-1 Bn v = q, i.e. node-level
P_eff = (Bn^T Pc^-1 Bn)^-1 and copy charges D q, D = Pc^-1 Bn P_eff.
Without face sheets: (model._potential, None).
kicad2ems.pcbqs.peec.prepare(model)[source]
Frequency/excitation-independent projections, reused until parts
change.