Skip to content

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.

Use the uniform Cartesian Yee RF/FDTD lane first. The public docs highlight maintained workflows and explicitly bounded claim envelopes:

SurfacePublic role
Uniform Yee RF workflowsrecommended default for tutorials, examples, probes, Harminv, selected S-parameter workflows, and benchmarked far-field workflows
Rectangular waveguide S-matricesvalidated inside the documented rectangular-guide envelope
Lumped, wire, and microstrip-line port workflowsavailable through their matching calculators; validation scope follows the support matrix
Coaxial line reflectionbounded one-port transmission-line workflow only; not a general coaxial S-matrix promise
Differentiable design loopsuse 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.


FeatureDetail
GPU accelerationJAX/JIT execution for large 3-D grids
Differentiable simulationjax.grad through time-domain workflows for inverse design
RF workflow toolsmaterials, sources, probes, ports, S-parameter helpers, Harminv, far-field utilities
Recommended examplescurrent runnable scripts under examples/crossval/ and selected inverse-design examples
Support-boundary disciplinepublic claims are tied to explicit guide/support-matrix envelopes, not to every importable symbol

Terminal window
pip install rfx-fdtd

GPU support depends on your JAX/CUDA environment:

Terminal window
pip install "jax[cuda12]" rfx-fdtd

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")

  • Simulation APISimulation, 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
  • Examples — recommended public runnable paths
  • Validation — public support and validation overview
  • API — curated public API contract