Skip to content

Sources and Ports

rfx separates sources from ports:

  • sources inject fields without impedance loading
  • ports add an impedance model for S-parameter style workflows
WaveformSignatureUse
GaussianPulseGaussianPulse(f0, bandwidth=0.5, amplitude=1.0)default wideband excitation
ModulatedGaussianModulatedGaussian(f0, bandwidth=0.5, amplitude=1.0, cutoff=5.0)resonance work with reduced DC content
CWSourceCWSource(f0, amplitude=1.0, ramp_steps=50)steady-state field visualisation
CustomWaveformCustomWaveform(func)JAX-compatible custom excitation
sim.add_source((0.025, 0.025, 0.010), "ez", waveform=GaussianPulse(f0=3e9))
sim.add_polarized_source((0.025, 0.025, 0.010), polarization="rhcp")

Use add_source() for ringdown and Harminv work when you do not want a load on the excited cell.

MethodPublic role
add_port(...)recommended lumped/wire port path for many RF examples
add_waveguide_port(...)rectangular waveguide modal workflows
add_msl_port(...)specialized microstrip-line S-matrix workflow
add_coaxial_port(...)experimental coaxial workflow; under active validation
add_floquet_port(...)experimental periodic / phased-array workflow
add_lumped_rlc(...)lumped network element at a cell
sim.add_port((0.01, 0.02, 0.01), "ez", impedance=50.0)
sim.add_port((0.01, 0.02, 0.0), "ez", impedance=50.0, extent=0.0016)
sim.add_coaxial_port((0.02, 0.02, 0.0016), face="top", impedance=50.0)
sim.add_waveguide_port(x_position=0.01, y_range=(0.0, 0.023), z_range=(0.0, 0.010))

Use the calculator that matches the port family:

PrimitiveCalculator
lumped/wire add_port(...)run(compute_s_params=True)
lumped/wire add_port(...) in differentiable objectivesforward(port_s11_freqs=...)
add_msl_port(...)compute_msl_s_matrix()
add_waveguide_port(...)compute_waveguide_s_matrix()

run(compute_s_params=True) is not a universal port dispatcher. MSL and waveguide ports use specialized calculators. Coaxial and Floquet S-parameter workflows are experimental and should not be presented as the default path.

Before launching a long run, call the S-parameter preflight for the calculator you intend to use:

sim.preflight_sparameters(calculator="run")
sim.preflight_sparameters(calculator="msl")
sim.preflight_sparameters(calculator="waveguide")
sim.preflight_sparameters(calculator="forward")
  • Use sources for clean transient or resonance extraction.
  • Use ports when you need impedance-normalized outputs.
  • Treat non-uniform, coaxial, Floquet/Bloch, subgridding, and mixed advanced-port workflows as experimental unless a guide says otherwise.
  • Keep public wording scoped to the current example or workflow being used.