rfx
A differentiable 3-D electromagnetic simulator for RF and microwave engineering, built in JAX.
See waves propagate, measure a component's response, and differentiate a design objective. Start with the visual manual and examples. The website identifies its source version; select the release matching your installation.
| You want to… | Start here |
|---|---|
| See results computed with the current code | Showcase · visual archive |
| Run a first model | First run · runnable examples |
| Look up an argument or result | API reference |
| Use rfx with a coding assistant | Machine-readable documentation |
| Check whether a result is supported | Support matrix · S-parameter limits · known limitations |
Release status: 2.0
rfx 2.1.0 is the current release. What 2.0 changes for a user:
- An input a solver path does not implement is refused, never dropped. If
run(),forward()or an S-parameter calculator routes your model to a path that does not solve a declared input (a conformal wall, subpixel smoothing, a lumped element, a port, a dispersive material, a solver or precision request), it raises before the first time step and names the input. It does not run a different model silently. - Validation cases are judged on criteria stated in advance, on a converged mesh: magnitudes within 2 dB, resonances and cutoffs within 1 %, group delay within 1 % of the reference. These are the criteria the project tests against, not a guarantee for every model. What is supported, and within which limits, is in the support matrix; what is currently wrong is in known limitations.
- Python 3.11 or newer, with JAX and jaxlib from 0.10.2 up to, not including, 0.11.2: pip installs 0.11.1 on Python 3.12 or newer and 0.10.2 on Python 3.11 (jaxlib 0.11.2 and 0.12.0 run the CPU time step 2.3–3× slower). Python 3.10 users stay on 1.x (1.7.0 on PyPI, 1.8.0 on the GitHub releases).
- Multi-device runs are supported within the limits in the support matrix.
run(devices=...)andforward(distributed=True)cut the grid into equal slabs along x and are compared with a one-device run of the same model. Lumped RLC elements and surface-impedance sheets are refused on multi-device runs in 2.0 (planned for 2.1), and the support matrix lists the other inputs these runs refuse by name.
Install
pip install "rfx-fdtd>=2.0"
For GPU execution, use a compatible JAX/CUDA installation:
pip install "jax[cuda12]" "rfx-fdtd>=2.0"
For the development version, clone this repository and run pip install -e ".[dev]".
The installation guide covers optional packages.
First run
A pulse in a small closed PEC box checks your installation. It records one field probe; it does not measure a device's S-parameters, resonance accuracy, or Q. This code is generated from hello_world.py, the same runnable example tested by CI.
from rfx import GaussianPulse, Simulation
sim = Simulation(
freq_max=10e9,
domain=(0.02, 0.02, 0.02),
dx=2e-3,
boundary="pec",
)
sim.add_source(
(0.01, 0.01, 0.01),
"ez",
waveform=GaussianPulse(f0=5e9, bandwidth=0.8),
amplitude_kind="current",
)
sim.add_probe((0.014, 0.01, 0.01), "ez")
preflight = sim.preflight()
print(preflight.format())
preflight.raise_for_failure()
n_steps = 120
result = sim.run(n_steps=n_steps, compute_s_params=False)
print(result.time_series.shape)
All lengths are metres and frequencies are hertz. Read the preflight findings. Continue with building and measuring a model.
Accuracy and development
Support depends on the structure, mesh, boundary and observable. A successful run or an agreeing automatic/finite-difference gradient is not a convergence study. The accuracy guide explains the checks; benchmarks link results to their scope.
To change rfx itself, read Contributing to rfx. Release changes are in CHANGELOG.md.
Citation
@article{kim_rfx_tmtt_2026,
author = {Byungkwan Kim},
title = {rfx: An End-to-End Differentiable 3-D FDTD Simulator for RF and Microwave Engineering},
journal = {IEEE Transactions on Microwave Theory and Techniques},
year = {2026},
pages = {1--15},
doi = {10.1109/TMTT.2026.3729863}
}
The simulation time S-parameter gradients need, and tail extrapolation carried through the gradient:
@misc{kim_sensitivity_convergence_2026,
author = {Byungkwan Kim},
title = {Delayed Convergence of S-Parameter Sensitivities to Design Parameters in FDTD Simulations},
year = {2026},
eprint = {2610.28496},
archivePrefix = {arXiv},
primaryClass = {eess.SP},
url = {https://arxiv.org/abs/2610.28496}
}
The software itself:
@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}
}
MIT License — see LICENSE. Developed at the Radar & ElectroMagnetic Intelligence Laboratory.
Metadata
Release files for rfx-fdtd 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rfx_fdtd-2.1.0.tar.gz | 2.1 MB | Without provenance | Details for rfx_fdtd-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rfx_fdtd-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for rfx_fdtd-2.1.0-py3-none-any.whl |
Total release size: 4.3 MB
Release files / rfx_fdtd-2.1.0.tar.gz
| Download URL | rfx_fdtd-2.1.0.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3073a65e12570be3304657a67ac7f3de6e443210395365889de4ca8633a99c6
|
|
BLAKE2b-256 checksum How to use checksums |
c9e611f5ea0b343b8897879da8a274a4a45dda5d13ff7461ac8a991871e9625f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / rfx_fdtd-2.1.0-py3-none-any.whl
| Download URL | rfx_fdtd-2.1.0-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8dae811852dcb012727cebadb111a9041f0e4dd19323c6ed37dac2af1ea42e2
|
|
BLAKE2b-256 checksum How to use checksums |
efb6f319f5f33cbebb5af804051468b2a2247cb9e1946a0fcc3e61d7053d8bd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for rfx-fdtd 2.1.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.