kicad2ems.mom25d.solvers.mom

mom25d as a kicad2ems solver: the board of the run (Board.to_dict(), the
content of <name>_board.json) solved by mom25d, which reads that format itself.

    S, names, zref, info = solve(board, freq, dmax=0.3)

MoM assumes laterally infinite dielectrics over an infinite ground plane: the
board outline does not exist for it, and edge walls are rows of vias.
class kicad2ems.mom25d.solvers.mom.MoM25D[source]
assess(run)[source]
Why it cannot model this board in this run, a list of reasons ([]: it
can). Called after the board and the line model are built, before any
solver prepares.
check(s=None)[source]
(usable, one line): its version and origin, or what is missing and
how to get it. s: the run's settings, where one says where the solver is
(--qucsator); None for --check.
deviations(run, prep)[source]
What mom25d's planar model leaves out or changes, by the rules it
states (mom25d.board): the ground is an infinite plane, copper below it
and the outline are left out, a via spans only the layers with metal at
it, edge walls are via rows, a part is one element across its gap
bridged by a strip.
estimate(run)[source]
The unknowns of mom25d's mesh of the board (meshed here, the ports
not characterised) and the time of a sweep of up to SOLVES solves.
outputs(run, prep, res)[source]
Its own outputs after the solve (plots, files, summary entries);
optional.
prepare(run)[source]
Its own form of the board (openEMS: the boundaries and the mesh),
handed to solve() and the later steps; None when it needs none. A
preview stops here.
readback(run, prep)[source]
mom25d's planar model of the board (mom25d.board.BoardModel), in
board terms.
resources()[source]
The GPU mom25d's LU would use (MOM25D_GPU), or why there is none.
reusable(run)[source]
An earlier run's S may stand for this one's solve (kicad2ems 2.12)
unless this run asks for what only a solve leaves: the far field
(antenna mode) or current dumps.
solve(run, prep)[source]
The Result: S-parameters over the board's ports as reported
(differential pairs as mixed-mode ports).
kicad2ems.mom25d.solvers.mom.aperture_text(ap)[source]
apertures()' result in a few words.
kicad2ems.mom25d.solvers.mom.apertures(m, s)[source]
mom25d.board.ground_apertures of the ground mom25d would put its infinite
plane at (the board's ground layer, moved up by --mom-planes pec as
mom25d.board.pec_planes does): [(polygon, mm2, layer)], [] for a complete
ground or none.
kicad2ems.mom25d.solvers.mom.current_dumps(run, res, freqs, ports=None, near=(), tag='mom25d', volume=None)[source]
mom25d's surface current density J (A/m) on each meshed layer at `freqs`
(Hz), its RWG basis functions sampled onto a grid (0 off the copper), and
with `near` (mm) the E field on planes that far above the top of the stack,
with H too, and with `volume` (h0, h1[, n] mm) E and H in that box above the
top (mom25d.farfield. near_fields), for the ports driven (names, default the
first) by mom25d's 1 V gap sources. Writes dump_*_fd.npz and dump_info.json
per port under <out>/mom25d/exc_<port>/; returns [(port, dict(dir, names))].
tag: the solver (the directory under <out>).
kicad2ems.mom25d.solvers.mom.factorisations(runlog)[source]
(on the GPU, on the CPU): the matrix factorisations of a sweep, from
mom25d's stage timings. A solve whose complex64 LU failed to precondition
counts on both (it is factored again in double on the CPU).
kicad2ems.mom25d.solvers.mom.mesh_convergence(Sa, Sb, names=None, floor=0.01)[source]
dict(db, deg, worst, converged): the largest change between two levels' S
(nf x n x n) in dB and degrees, over the points where |S| reaches floor (-40
dB, as the FDTD layer's check: the phase of what is not there is noise), and
the term it is on.
kicad2ems.mom25d.solvers.mom.mom25d_status()[source]
(usable, one-line description) of mom25d for --check and the solver
checks before a run: where it comes from, its version and whether its
compiled core is built (it meshes: not usable without it).
kicad2ems.mom25d.solvers.mom.ports_below(m, s)[source]
The ports on copper below the ground mom25d would put its infinite plane
at (which the ground stack cannot have: rf_msvia's P2 on B.Cu under the
In2.Cu ground).
kicad2ems.mom25d.solvers.mom.reused(runlog)[source]
The solves of a sweep that reused a factorisation kept from another
frequency instead of their own.
kicad2ems.mom25d.solvers.mom.run_finish(run)[source]
The run's surface finish (kicad2ems.core.finish.resolve), or
None.
kicad2ems.mom25d.solvers.mom.save_mesh(run, sim, model, solver='mom25d')[source]
mom25d's mesh for the 3D view and the plan (meshes.py): each meshed
layer's triangles at its copper's height, and the diagonals merged into quad
cells (`hidden`, a run's). solver: the file's name, 'mom25d' (the preview)
or 'mom25d-run' (the mesh a run solved on).
kicad2ems.mom25d.solvers.mom.solve(m, freq, dmax=0.3, port='auto', max_solves=60, sigma=None, rough=None, finish=None, log=<built-in function print>, progress=None, hold=None, on_step=None, keep_at=(), excite=None, **mesh)[source]
S-parameters of the board m on `freq` (Hz) from mom25d, as kicad2ems
reports them: (S (nf, n, n) in m.user_ports order with differential pairs as
(d, c) modes, names, reference impedances, info dict). dmax in mm (planes
3x, refined near the copper of other layers). sigma (S/m): conductor loss,
as --sigma gives openEMS (default: lossless copper, like openEMS's PEC
sheets). progress(solves, at most, f). hold: a dict that receives mom25d's
result as 'res' (its model and simulation, for the current dumps). keep_at:
frequencies (Hz) the sweep solves and keeps the currents of (sim.kept: the
current dumps'). mesh: _board_kw's options (quads, quad_tol, coarsen, zone,
cells, the vias; stack: 'ground' (an infinite ground plane) or
'whole' (every copper layer meshed, mom25d.board ground='none'); planes,
stitching_pads, thickness, wideband: mom25d.board's (wideband: the
frequency, Hz, of a Djordjevic-Sarkar stack's er and tand, or None)).