Skip to main content

rfx

██████╗ ███████╗██╗  ██╗
██╔══██╗██╔════╝╚██╗██╔╝
██████╔╝█████╗   ╚███╔╝
██╔══██╗██╔══╝   ██╔██╗
██║  ██║██║     ██╔╝ ██╗
╚═╝  ╚═╝╚═╝     ╚═╝  ╚═╝

Differentiable 3D FDTD electromagnetic simulator for RF and microwave engineering — powered by JAX.

Start with the uniform Cartesian Yee solver. Feature support and its limits live in the support matrix; per-port-family S-parameter limits live in the S-parameter support matrix.

License Tests PyPI Docs

At a Glance

GPU-accelerated 200³ grid on an RTX 4090: 7,266 Mcells/s with PEC walls, 2,087 Mcells/s with CPML absorbers — an open-boundary simulation pays the absorber, so quote the second for antenna/scattering work. Measured by marginal-cost differencing (scripts/diagnostics/gpu_throughput_bench.py); see the benchmark guide for other cards.
Differentiable jax.grad through the time-domain solver for sensitivity and inverse design
RF workflow tools materials, sources, probes, ports, S-parameters, Harminv, far-field / RCS
Per-family S-parameters lumped/wire, microstrip, rectangular waveguide, and coaxial paths use distinct calculators
Preflight + fidelity guards sim.fidelity_report() shows declared-vs-rasterized geometry before a solve; sim.preflight() surfaces setup errors and support-boundary issues
Supervisable long runs report_every=N prints step count, elapsed time, rate, and ETA on supported uniform and single-device non-uniform runs when checkpointing is compatible
Cross-validated public cases mapped to Meep / OpenEMS / Palace / analytic references, each with a reproduce command

Installation

pip install rfx-fdtd                  # CPU
pip install "jax[cuda12]" rfx-fdtd    # GPU (JAX + CUDA)

Development install:

git clone https://github.com/bk-squared/rfx.git
cd rfx && pip install -e ".[all]"

Quick Start

from rfx import Box, GaussianPulse, Simulation

sim = Simulation(
    freq_max=5e9,
    domain=(0.14, 0.06, 0.05),
    dx=2e-3,
    boundary="cpml",
    cpml_layers=8,
)
sim.add_material("slab", eps_r=2.2, sigma=0.01)
sim.add(Box((0.07, 0.018, 0.018), (0.09, 0.042, 0.032)), material="slab")
sim.add_source(
    (0.03, 0.03, 0.025),
    "ez",
    waveform=GaussianPulse(f0=3e9, bandwidth=0.8),
)
sim.add_probe((0.11, 0.03, 0.025), "ez")

sim.fidelity_report()
preflight = sim.preflight()
print(preflight.format())
preflight.raise_for_failure()

result = sim.run(n_steps=1200, report_every=200)
print(result.time_series.shape)

fidelity_report() describes how each entity rasterizes; it does not predict RF error. Progress reporting is off by default and does not change returned arrays.

For a real antenna workflow — including the mesh, time-window, and reference checks required before reporting RF results — follow the First Patch tutorial.

Interfaces

Beyond the Python API:

  • Dashboard — pip install "rfx-fdtd[dashboard]" && rfx-dashboard: browser GUI for building, running, and inspecting a simulation.
  • Experiment CLI — rfx experiment run <spec.json>: versioned CPU runs from a strict JSON spec, with submit/status/cancel.
  • Studio + MCP — pip install "rfx-fdtd[studio]" && rfx studio: local app with append-only experiment revisions, approval-gated MCP actions, and an optional LLM Design Copilot.

The Experiment CLI and Studio/MCP share the same ExperimentSpec format. Details, safety model, and remote deployment: Studio, CLI, and MCP Experiments.

Differentiable Design

JAX-traced objectives for inverse design — sensitivity calculations through the discrete solver, validated per port family. Runnable examples with finite-difference cross-checks live in examples/inverse_design/; background in the Autodiff and Adjoint guide.

Validation

Every public cross-validation case is mapped to a named analytic or external reference with a reproduce command and acceptance gates. Start with Cross-Validation and Accuracy for the support limits, then Benchmarks for the per-case numbers. The CPU-feasible subset runs locally:

PYTHONPATH=. python scripts/run_crossval_cpu.py

Exit codes: 0 all gates passed, 1 a gate failed, 2 a required external reference was unavailable (inconclusive, not silently green).

Documentation

Full documentation: remilab.ai/rfx

Citation

@software{kim_rfx_2026,
  author       = {Byungkwan Kim},
  title        = {rfx: JAX-based differentiable 3D FDTD simulator for RF engineering},
  institution  = {REMI Lab, Chungnam National University},
  year         = {2026},
  url          = {https://github.com/bk-squared/rfx}
}

License

MIT License. See LICENSE.

Acknowledgments

Developed by Byungkwan Kim at the Radar & ElectroMagnetic Intelligence (REMI) Laboratory, Chungnam National University.

Metadata

Release files for rfx-fdtd 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rfx-fdtd 1.7.0
File Size Uploaded Provenance
rfx_fdtd-1.7.0.tar.gz 3.2 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rfx-fdtd 1.7.0
File Interpreter ABI Platform
rfx_fdtd-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 MB

Release files / rfx_fdtd-1.7.0.tar.gz

Download URL rfx_fdtd-1.7.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e43ef416e298a4cd898ea49f3c7a2f5cabcf564dd3bc197a04af4bb1e39e11e6
BLAKE2b-256 checksum
How to use checksums
7a5d0156b771657bfdbdf705804f8fd7a354b4e5ae5ea9d64f483590c2c1764b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / rfx_fdtd-1.7.0-py3-none-any.whl

Download URL rfx_fdtd-1.7.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ddf3398c280090520558d4cb6b4be7612a4a772a41cf9d364cddd9f05ec0f424
BLAKE2b-256 checksum
How to use checksums
7ce64c45fe9c2c14d7c7088b59b4f0d92fb55022914aa3a6647092d3a59747be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for rfx-fdtd 1.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page