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(...)coaxial transmission-line reflection workflow via compute_coaxial_line_reflection(...)
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()
add_coaxial_port(...)compute_coaxial_line_reflection(...) for bounded one-port line reflection

run(compute_s_params=True) is not a universal port dispatcher. MSL, waveguide, and coaxial-line workflows use specialized calculators.

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.
  • Use non-uniform workflows only with the relevant guide and validation checks.
  • Use coaxial line reflection only inside its documented envelope.
  • Advanced mixed-port workflows require a documented support entry before they are used in public examples.