kicad2ems.emsdev.numerics.biot¶
The magnetic field of surface currents on triangles and of straight filaments,
by Biot-Savart:
H(r) = 1/(4 pi) int J(r') x (r - r') / |r - r'|^3 dS'. Exact for the
quasi-static near field (the board much smaller than a wavelength, or the point
much nearer than one).
J = rwg_currents(rwg, I) # (a, b) per triangle: J(r) = a r + b on it, A/m
H = h_sheets([(rwg_nodes, tris, a, b, z), ...], pts)
# (n, 3) complex, A/m
H += h_segments(seg_a, seg_b, I_seg, pts) # filaments (vias): end points
# (m, 3), currents
Jx, Jy = current_deposit(sim, I, x, y, k) # a layer's current density on a
# grid (the FFT near field)
The surface integral is a 6-point rule per triangle, subdivided where a point is
near the triangle (closer than `near` x its size): each triangle split into 4,
twice at most; accurate to about 1% for points at a tenth of a triangle's size
and more above the sheet.
- kicad2ems.emsdev.numerics.biot.current_deposit(sim, I, x, y, k, per_cell=2.0)[source]¶
The surface current of interface k as a density on the uniform grid x, y (m), for the near field's FFT: each triangle's current integrated by a 6-point rule (triangles larger than `per_cell` cells split into four until they are not), each point's current moment spread onto its four grid points (cloud in cell). The total current and its centre are kept on any grid; sampling the current at the grid points instead was fragile (it crowds at a trace's edges: a row of points on one edge and none on the other put rf_gcpw's 1 mm near field 0.15 mm off the trace's centre, and at another step halved it). Returns Jx, Jy ((nx, ny) complex, A/m).
- kicad2ems.emsdev.numerics.biot.h_segments(p0, p1, I, pts)[source]¶
H (n, 3) at pts of straight filaments from p0 to p1 ((m, 3) m) carrying I (m,) amps (or (m, k): H (n, 3, k)): the finite-segment Biot-Savart, H = I / (4 pi d) (cos t1 - cos t2) around each.
- kicad2ems.emsdev.numerics.biot.h_sheets(sheets, pts, near=1.5, levels=2)[source]¶
H (n, 3) complex at points pts (n, 3), m, of the sheets [(nodes (N, 2) m, tris, a, b, z)]: each a triangle mesh at height z carrying J = a r + b on each triangle (A/m). With a (M, k) and b (M, 2, k) for k excitations (frequencies): H (n, 3, k), the geometry made once.