rfx
Differentiable FDTD for RF/Microwave — powered by JAX
rfx is a 3-D finite-difference time-domain (FDTD) electromagnetic simulator built in JAX. These docs focus on maintained user workflows with explicit support boundaries.
Current public status
Section titled “Current public status”Use the uniform Cartesian Yee RF/FDTD lane first. The public docs highlight maintained workflows and explicitly bounded claim envelopes:
| Surface | Public role |
|---|---|
| Uniform Yee RF workflows | recommended default for tutorials, examples, probes, Harminv, selected S-parameter workflows, and benchmarked far-field workflows |
| Rectangular waveguide S-matrices | validated inside the documented rectangular-guide envelope |
| Lumped, wire, and microstrip-line port workflows | available through their matching calculators; validation scope follows the support matrix |
| Coaxial line reflection | bounded one-port transmission-line workflow only; not a general coaxial S-matrix promise |
| Differentiable design loops | use proxy objectives, gradient checks, and documented validation before treating a design result as evidence |
If a capability is not listed here or in the support-boundary page, treat it as outside the documented public support scope until the support matrix lists it.
Why rfx
Section titled “Why rfx”| Feature | Detail |
|---|---|
| GPU acceleration | JAX/JIT execution for large 3-D grids |
| Differentiable simulation | jax.grad through time-domain workflows for inverse design |
| RF workflow tools | materials, sources, probes, ports, S-parameter helpers, Harminv, far-field utilities |
| Recommended examples | current runnable scripts under examples/crossval/ and selected inverse-design examples |
| Support-boundary discipline | public claims are tied to explicit guide/support-matrix envelopes, not to every importable symbol |
Quick install
Section titled “Quick install”pip install rfx-fdtdGPU support depends on your JAX/CUDA environment:
pip install "jax[cuda12]" rfx-fdtdTen-line example
Section titled “Ten-line example”from rfx import Simulation, Box, GaussianPulse
sim = Simulation(freq_max=4e9, domain=(0.08, 0.06, 0.025), boundary="cpml")sim.add(Box((0.0, 0.0, 0.0), (0.08, 0.06, 0.0016)), material="fr4")sim.add(Box((0.02, 0.01, 0.0016), (0.049, 0.049, 0.0016)), material="pec")sim.add(Box((0.0, 0.0, 0.0), (0.08, 0.06, 0.0)), material="pec")sim.add_source((0.029, 0.03, 0.0008), "ez", waveform=GaussianPulse(f0=2.4e9, bandwidth=0.8))sim.add_probe((0.029, 0.03, 0.0008), "ez")
result = sim.run(n_steps=8000)modes = result.find_resonances(freq_range=(1.5e9, 3.5e9))print(f"Resonance: {modes[0].freq/1e9:.4f} GHz")Documentation by topic
Section titled “Documentation by topic”Getting Started
Section titled “Getting Started”- Installation — Python/JAX install, GPU notes, dev setup
- Quick Start — first simulation with the current high-level API
- Your First Patch Antenna — current-source resonance workflow
Modeling & Setup
Section titled “Modeling & Setup”- Simulation API —
Simulation,Result,auto_configure, ports, NTFF, and design helpers - Materials & Geometry — library materials, Debye/Lorentz, CSG shapes, PCB stackup
- Sources & Ports — point sources, lumped/wire ports, microstrip-line ports, waveguide ports, and bounded coaxial-line reflection
- Probes & S-Parameters — DFT probes, S-matrix helpers, Harminv, de-embedding, exports
- Memory Reduction — reduce FDTD/AD memory while preserving validation boundaries
- Waveguide Ports — rectangular waveguide modal workflows
Analysis & Validation
Section titled “Analysis & Validation”- Cross-Validation & Accuracy — short public validation overview
- Benchmarks — quantitative benchmark summary
- Convergence Study — mesh refinement workflow
- Far-Field & RCS — NTFF radiation patterns and scattering workflows
- Visualization & Analysis — plotting, exports, post-processing
Design & Optimization
Section titled “Design & Optimization”- Autodiff and Adjoint Background — Meep-informed gradient concepts for microwave engineers
- Inverse Design — autodiff-driven optimization with documented proxy objectives
- Gradient Behavior — where gradients are reliable vs noisy
- Parametric Sweeps — sequential sweep and
jax.vmapdesign-space exploration - Patch Antenna Design — rectangular patch workflow
Secondary hubs
Section titled “Secondary hubs”- Examples — recommended public runnable paths
- Validation — public support and validation overview
- API — curated public API contract