首页 > AI前沿 > Open-source, GPU-first EM simulation and automated meshing for KiCad

Open-source, GPU-first EM simulation and automated meshing for KiCad

Hacker News 2026-11-30 20:05 24 阅读 查看原文
FieldForge Open-source, GPU-first EM simulation + automated meshing for KiCad (1–50 GHz PCB SI). Select a net or differential pair in KiCad → exact geometry + stackup extracted over the IPC API → auto-meshed openEMS / Palace model → Touchstone S-parameters plotted back in the plugin. No Gerber round-trip, no manual meshing. Status: board extraction, automated meshing, GPU FDTD and shielded-MoM S-parameter production are working end to end, including mixed-mode pairs and via-transition sweeps through 50 GHz. Shipped so far (each with tests + a committed validation report): Headless KiCad 9 IPC extraction (nets → layered polygons + vias + stackup), verified on Antmicro Jetson Orin (8L), HackRF One, Castor & Pollux, StickHub — three .kicad_pcb format generations through one code path. Auto graded grid (1/3–2/3 edge snapping, smoothness ≤ 1.5) + openEMS backend: microstrip Z0 −1.74% / stripline +1.21% vs analytic (2 % gates, zero manual mesh edits) — validation/reports/p04_z0_gates.*. gerber2ems head-to-head on identical coupons: diff pair |ΔSDD21| p95 0.32 dB, |ΔSDD11| 2.34 dB (0.2–6 GHz, gates 0.5/3 dB) — PASS; reference-tool passivity limits documented above 12 GHz — validation/reports/p05_crosscheck.*. Palace/Gmsh emitter (prism extrusion, SIBC tags, lumped ports) — solve queued for the lab server (docs/server-runbook.md). PyQt6 plugin: net picker → extract → simulate → S-param panel, with automatic net-region cutout meshing. CUDA Yee kernels (sm_61 + sm_86) with exact-advection gates, plus the ff_yee3d_* physics-module ABI described below. Via-transition validation reaches 50 GHz (validation/reports/p40_fdtd_via.json). Shielded-MoM production path (mom): board or cached geometry in, dense GPU solve where available, adaptive band synthesis, Touchstone output, and honest linear-point fallback when a rational fit is not passive or cannot converge. Coupled pairs produce mixed-mode SDD/SCC files (--diff), with passivity and reciprocity recorded in the report (docs/product_loop.md). SI plots Mixed-mode SDD parameters and the corresponding Smith chart for a real bridge3090 differential pair (12 solved points, 0.2–6 GHz): The same SDD loci projected onto the Riemann hemisphere: An |S(i,j)| heatmap for the NVCLK1_P four-port network at 2 GHz: Generate these views with mom.plot: --mm for mixed-mode labels and --sphere for the hemisphere projection. The solver also writes the underlying Touchstone and JSON reports, so every figure remains machine-checkable. Quick start (dev box): ./ci/run_ci.sh all # unit + KiCad + solver + CUDA tiers python -m fieldforge_gui.app --board # from kicad-plugin/ Shielded-MoM product loop — one command to S-parameters: python -m mom board.kicad_pcb --nets NET_P,NET_N --band 0.5:4 python -m mom geoms.pkl --name jetson_can --band 0.5:4 --loss --thick python -m mom pair.pkl --name pair --diff NET_P,NET_N # mixed-mode SDD/SCC python -m mom.plot out/pair_mm.s4p --mm --sphere # Smith charts Writes .sNp + .report.json (and _mm.sNp with --diff); adaptive band synthesis solves ~8–12 points for a full band and falls back to honest point solves when the fit can't be trusted (band_mode in the report); GPU auto-detected. Details: docs/product_loop.md. Next milestones Close the unattended convergence loop across the public mesh gauntlet. Complete open-media MoM and SI-aware routing integrations. Correlate additional coupon measurements above 6 GHz against the solvers. Layout core/ C++20 + CUDA: ffdtd kernels (P1+), C ABI [Apache-2.0] pyff/ geometry model, extractors, emitters, drivers [Apache-2.0] kicad-plugin/ IPC-API client + PyQt6 panel [GPL-3.0-or-later] validation/ benchmark defs, golden data, report generator docs/ licenses audit, design notes tests/ pytest suite (V0 analytic gates run in CI) Credits IPC-API board-access patterns adapted from OrthoRoute (MIT, © 2025 bbenchoff). Cross-validation baseline: gerber2ems (Apache-2.0, Antmicro). Solvers integrated, not reinvented: openEMS (GPL-3), Palace (Apache-2.0), Gmsh, scikit-rf. License Apache-2.0 for core/ and pyff/; GPL-3.0-or-later for kicad-plugin/; see docs/licenses.md for the full dependency audit. Solver module ABIs (composition contract) The naive Yee engine (ff_yee3d_*) is the spine; physics modules compose around the public step call — no engine-internal coupling: per step: ff_debye_pre(dctx) # E^n snapshot (trap ADE) ff_yee3d_step(ctx, 1, ...) # H, CPML, E, CPML, source ff_debye_post(dctx) # dispersion correction ff_sibc2_apply(damp) # per-face conductor damping ff_sibc_apply(pin) # thin-sheet E_t (v2 hybrid) ff_ports_*(pctx) # V/I gather + on-device DFT Accessors for sibling modules: ff_yee3d_get_fields / _get_meta / _get_spacing_tables / _get_material_map (additive-only ABI). ff_march3d_*: fused z-march throughput engine (ping-pong buffers; no CPML/ports yet — capacity/speed path, bit-compatible physics). CPML profiles: pyff.cpml (physical-distance grading) is canonical; ffdtd_driver.cpml_tables is deprecated on graded axes. Field dumps/viewer: pyff.fielddump + python -m pyff.ffview. Measurement instruments: two-probe gated transmission (pyff.msl_sibc, ±25% window systematics — documented) and the sealed-box resonator-Q (pyff.resonator_q, window-immune). Reports index: validation/reports/p1*_*.json — every number regenerable by the matching validation/gen_*.py.