kicad2ems.fdtd.model

The FDTD model: the board and its mesh as CSX geometry (dielectrics, copper
sheets, via cylinders, parts, drawn solids), lumped ports, the Gaussian
excitation and the boundaries, built through openEMS's Python interface
(ContinuousStructure, openEMS) of whichever engine runs it (engines.py). With
the mesh's copper thickness plan (--thickness on, thick.py) the copper is solid
and the stack moved to make room for it. Drawn solids (board.solids) are
core.solids' disjoint pieces as extruded polygons (_solids, SOLID_PRIORITY), the
posts the mesh snapped moved onto their line crossings; with --sigma the metal's
faces the field reaches are conducting sheets (faces.py), and a closed can's
sides PEC.
kicad2ems.fdtd.model.build_fdtd(m, mesh, fmin, fmax, excite, bc=('MUR', 'MUR', 'MUR', 'MUR', 'MUR', 'MUR'), end_db=-40, sigma=None, max_steps=1000000, dumps=(), diel='fixed', diel_fref=1000000000.0, exc_fmax=None, api=None, rough=None, copper_kw=None, line_plan=None)[source]
sigma: copper conductivity (conducting sheets; None: PEC). rough: um RMS,
the sheets' own roughness (an engine with it: gfdtd; None: smooth).
diel: 'fixed' (loss as a conductivity fitted at the band centre) or
'wideband' (Djordjevic-Sarkar model matched at diel_fref Hz, as Debye poles;
see dielectric.py). exc_fmax: upper edge of the Gaussian excitation (default
fmax; antenna runs extend it, see antenna.py). api: (ContinuousStructure,
openEMS) classes to build with (engines.engine_api; None: the default
engine; readback.py records the calls). copper_kw: dict(faces=, finish=)
from the solver's copper_kw(): faces marks thick copper's sheets as faces
(gfdtd); finish puts the surface finish on the outer layers - with thick
copper on their outer face's own sheet, else on their sheets weighted by the
strip's share; as the sheets' own (finish['wideband'], gfdtd) or as the
conductivity of the same loss at the band centre. line_plan:
lineport.plan_ports' plan, the line probes behind those ports (R-E1); then
(FDTD, CSX, ports, probes {port index: probe port}) is returned.
kicad2ems.fdtd.model.port_index(m, names)[source]
Indices of single-ended ports to excite: names may be legs (P1+) or whole
ports (P1).
kicad2ems.fdtd.model.pulse_steps(fmin, fmax, dt_ps, exc_fmax=None)[source]
Length of openEMS's Gaussian excitation in timesteps (2 * 9 / (2 pi fc) /
dt, fc as set in build_fdtd), with the mesher's time step estimate
(openEMS's own step is often ~10 % smaller, so the true count is a little
higher). The fields must ring down after it: allow --max-steps well above
this.
kicad2ems.fdtd.model.pulse_time(fmin, fmax)[source]
Length (s) of openEMS's Gaussian excitation for the band (as set in
build_fdtd).