kicad2ems.core.rlgc - per-unit-length R(f), L(f), G(f), C(f) of transmission
lines: a cross-section given by its sizes, or every distinct cross-section of a
board's nets (each coupled group and each single trace as the line model cuts
the board across it). R and L have the skin and proximity effects and the
return's own crowding in the planes (kicad2ems.core.lines.mqs: a 2D
eddy-current solve with the copper meshed inside); G and C are the field
solver's (kicad2ems.core.lines.xsection).
python -m kicad2ems.core.rlgc board.kicad_pcb --nets 'DQ*,CLK*' --out o
[--layers F.Cu,In2.Cu] [--min-length 1]
python -m kicad2ems.core.rlgc --xs microstrip --w 0.15 --lines 2
--gap 0.15 --h 0.2 --er 4.3 --t 0.035 --out o
python -m kicad2ems.core.rlgc --xs stripline --w 0.1 --h 0.15 --h2 0.15
--er 3.7 --t 0.018 --out o
python -m kicad2ems.core.rlgc --xs section.json --out o
# an xsection.CrossSection's to_dict()
common: [--fmin 0.001] [--fmax 20] GHz [--per-decade 5] [--sigma 5.8e7]
[--rough um] [--diel fixed|wideband] [--diel-fref 1] GHz
[--length mm] [--z0 50]
Each section gets
<out>/<name>.rlgc the W-element's RLGC file (HSPICE's RLGCfile=): Lo
the external inductance, Co, Ro the DC resistance,
Go 0, Rs and Gd fitted (R = Ro + Rs sqrt(f) (1 + j),
G = Gd f): the analytic model
<out>/<name>_w.inc the W-element's tabular model (MODELTYPE=TABLE: the
four `sp` models, every frequency, DC first)
<out>/<name>.s<2N>p its S-parameters over its length (ports 1..N the near
ends, N+1..2N the far ends), reference z0
<out>/rlgc_<name>.png R and L of each line over frequency (the FIGURES
longest sections)
and <out>/rlgc.json every section: its nets, layer, length, cross-section, the
matrices at every frequency, its modes' attenuation and impedance at fmax.
On a board, the nets are those whose names match a pattern (fnmatch, as
core.coupling has them); the line model of those nets is built with every
section on the board's cut (field 'all'), the reference copper every net that
is not a routed signal (ipc's impedance map's rule). Sections of one net (or
one group of nets) on one layer with the same cross-section are one, their
lengths added; a section shorter than --min-length mm is left out (a pad's
breakout), and so is a stretch of no reference copper. The planes' and the
other layers' copper get their own layers' thickness.