kicad2ems.gfdtd.fdtd

openEMS's Python interface over gfdtd's engine: the FDTD settings, the ports
(lumped here; MSL, stripline, CPW, coaxial, waveguide and curve ports in
gfdtd.ports) and Run, so a script (or kicad2ems's build_fdtd) written for
openEMS runs here by swapping the two imports:

    from kicad2ems.gfdtd import ContinuousStructure, openEMS
    FDTD = openEMS(NrTS=100000, EndCriteria=1e-4); FDTD.SetGaussExcite(f0, fc);
    FDTD.SetBoundaryCond(['MUR'] * 6)
    CSX = ContinuousStructure(); FDTD.SetCSX(CSX); ...
    port = FDTD.AddLumpedPort(1, 50, start, stop, 'z', excite=1)
    FDTD.Run(sim_path); port.CalcPort(sim_path, freq)
        # port.uf_inc, uf_ref, ...

FDTD.Write2XML / ReadFromXML use openEMS's XML (an <openEMS> file with <FDTD>
and <ContinuousStructure>):
`python -m kicad2ems.gfdtd model.xml` runs a file written by openEMS (or by
AppCSXCAD's tools) like `openEMS model.xml`.
class kicad2ems.gfdtd.fdtd.LumpedPort(CSX, port_nr, R, start, stop, exc_dir, excite=0, **kw)[source]
openEMS's LumpedPort: a resistor R across the box along p_dir, a soft E
excitation (when excite != 0), a voltage probe through its middle and a
current probe across its middle; CalcPort gives uf_tot, if_tot, uf_inc,
uf_ref, if_inc, if_ref (and the time signals ut_*, it_*) as openEMS's
does.
CalcPort(sim_path, freq, ref_impedance=None, ref_plane_shift=None, signal_type='pulse')[source]
Incident and reflected waves (uf_inc, uf_ref, if_*, ut_* / it_* for a
scalar reference) and the powers P_inc, P_ref, P_acc, as openEMS's
Port.CalcPort.
kicad2ems.gfdtd.fdtd.main(argv=None)[source]
python -m kicad2ems.gfdtd model.xml [--backend
auto|gpu|vulkan|cpu|numpy] [--path DIR]: run an openEMS XML file
(outputs in the current folder, or --path), as `openEMS model.xml` does.
kicad2ems.gfdtd.fdtd.read_probe(path)[source]
(t, values) of an openEMS / gfdtd probe file.