kicad2ems.fdtd.lineport

Line ports for the FDTD model (R-E1, `--port-kind line | auto`): voltage and
current probes on a port's straight feed, behind its lumped port, which stays
the source and the termination. The probes are openEMS's (and gfdtd's)
microstrip-port arrangement, not excited: three voltage lines from the reference
copper to the strip and two current loops round it, near a measurement plane `d`
along the feed, which give the line's waves there and the line's own Zc and
gamma.

S comes from the waves of every run: a = (V + z0 I) / 2 and b = (V - z0 I) / 2
at each probed port's plane (the lumped ports' own a and b where a port has no
probes), S = B A^-1 in z0 (50 ohm) at those planes, exact whatever the ports'
terminations reflect. Each probed port's reference is then moved back to the
lumped port's plane along the FDTD's own line (its Zc and gamma read at the
plane in its own run, fitted over the band): the result is the board from the
same planes as the lumped S, without the lumped port's feed (its inductance and
the trace behind it). The same runs give the lumped S as well.

A port takes probes where its trace runs straight at one width from the port to
the probes' last plane and END_CLEAR more (the next change of the line, its near
field), the measurement plane d = max(3 h, 2 w, four mesh cells, D_MIN) along
it, with no other signal copper within 3 h of its edges there; vertical ports of
single-ended lines on sheet copper only. Every port must be driven (B A^-1 needs
each port's run).

    plan, notes = plan_ports(m, mesh, 'auto')  # {port index: dict(d, layer,
                                               # ...)}, why the others are not
    S = solve(m, freq, res, plan)              # res: run_excitations' RunResult
                                               # with res.lines
kicad2ems.fdtd.lineport.add(FDTD, cu_props, plan)[source]
The probes of every planned port, on its layer's own copper property
(cu_props {layer: property}): the port objects {index: port} (numbers past
the lumped ports', names 'line_port_...'). Their box: from the port plane to
their last plane along the feed, across the trace, from the strip (start's
z) to the reference copper (stop's).
kicad2ems.fdtd.lineport.feed_length(m, p, upto)[source]
How far (mm) the port's trace runs straight from the port along its
direction at its width (within WIDTH_TOL), looked at up to `upto` mm.
kicad2ems.fdtd.lineport.fit_line(freq, z, beta)[source]
The line's Zc and beta over the band, smoothed: Zc linear and the
effective index beta / k0 quadratic in f, fitted above the band's lowest
FIT_DROP (where the probes read poorly).
kicad2ems.fdtd.lineport.plan_ports(m, mesh, kind)[source]
{port index: probe plan} and notes [str] for --port-kind kind: 'lumped'
none; 'auto' every port that can have probes, a note for the others; 'line'
every single-ended vertical port, an error where one cannot (a part's
internal ports stay lumped).
kicad2ems.fdtd.lineport.read(probes, path, freq)[source]
What each probe read in a run: {index: dict(u, i, z, beta, d)} (V and I
at its plane, the line's Zc and beta, the plane's distance from the port in
mm).
kicad2ems.fdtd.lineport.solve(m, freq, res, plan)[source]
S (nf, n, n) over the single-ended ports, each port's z0, from the probes
and the lumped ports of every run (B A^-1), each probed port's reference
moved back to its lumped port's plane; and the lines read {port name: (Zc at
mid-band, eps_eff at mid-band, plane mm)} for the log.
kicad2ems.fdtd.lineport.waves(m, res, plan, z0=None)[source]
A, B (nf, n, n): a and b of port i (row) in the run that drives port k
(column).
kicad2ems.fdtd.lineport.window(m, p, mesh)[source]
(dict(d, clear, feed), None) where port p can have probes, else (None,
why).