The fields over a board while its circuit runs: H from the currents in its
copper, E from the voltages on it.
python -m kicad2ems.pcbqs.circuit model.json --out result --fields
# implies --copper
export(model, summary, copper, out, log) # engine.run(..., fields=True)
# calls it
For each case, on planes 1 and 5 mm above the top copper (fields.heights_mm),
over the last period:
H The copper's port currents of the reported run are taken apart into
harmonics of the period (the first 16, fields.harmonics; from ngspice's
own time steps). The solver that gave the circuit its copper model
(pcbqs.mqs) gives, at each harmonic, the current everywhere in the copper
for those port currents, and H from that by Biot-Savart. Put back
together over the period.
E Each net's copper is a conductor at its node's voltage, the ground at
zero. The charge that puts on the copper comes from the board's
capacitance (the same mesh, with its dielectric), once for a volt on each
net; E at any instant is those fields weighted by the nets' voltages at
that instant. Nothing is band-limited here: E has the edges as the
circuit has them.
What that is, and is not:
- the copper and its vias only. No part's own field is in it: not an
inductor's stray field, not the E of a part's body or a heatsink tab above
the board. Those need a model of each part (docs/circuit.md).
- quasi-static: the Coulomb E of the charges, without the induced E of
changing currents (-dA/dt), and no radiation. It is what a near-field
probe a few millimetres over the board sees, not a far field.
- the board taken as grounded: its ground copper at zero volts against its
surroundings. A board that floats has a common-mode voltage on top of this
that no circuit on the board alone decides.
- H up to the last harmonic kept: the ringing at the edges (hundreds of MHz)
is above it, and case['fields'] says what share of the port currents' AC
was left out.
<case>/exc_fields/: the fields as field dumps a viewer shows (kicad2ems's Viewer
finds <run>/*/exc_*): H and E on each plane over the period, time_samples frames
each (dump_H_top_1mm_td_0000.vtr ...), with dump_info.json (the period's step,
the copper to outline). <case>/fields.npz: x_mm, y_mm, heights_mm, time_s,
H_A_per_m and E_V_per_m (time, x, y, height, 3), their RMS maps with and without
the part that does not change over the period, H's harmonics; <case>/fields.png:
the AC RMS maps over the board's copper (a picture for a page, not the
report's).