twpasolver.models.rf_functions module#

Compiled functions for components impedance and abcd matrices.

twpasolver.models.rf_functions.inductance(freqs: ndarray[Any, dtype[float64]], L: float) → ndarray[Any, dtype[complex128]][source]#

Impedance 2j pi f L of an inductance.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • L (float) – Inductance in H.

twpasolver.models.rf_functions.capacitance(freqs: ndarray[Any, dtype[float64]], C: float) → ndarray[Any, dtype[complex128]][source]#

Impedance -1j / (2 pi f C) of a capacitance.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • C (float) – Capacitance in F.

twpasolver.models.rf_functions.stub(freqs: ndarray[Any, dtype[float64]], L: float, C: complex, length: float, open: bool = True) → ndarray[Any, dtype[complex128]][source]#

Impedance of an open or shorted stub.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • L (float) – Inductance per unit length.

  • C (float) – Capacitance per unit length.

  • length (float) – Length of the stub.

  • open (bool) – Open stub if True, shorted stub otherwise.

twpasolver.models.rf_functions.parallel_admittance_abcd(Y: ndarray[Any, dtype[complex128]]) → ndarray[Any, dtype[complex128]][source]#

ABCD matrices [[1, 0], [Y, 1]] of a shunt admittance, shape (len(Y), 2, 2).

twpasolver.models.rf_functions.series_impedance_abcd(Z: ndarray[Any, dtype[complex128]]) → ndarray[Any, dtype[complex128]][source]#

ABCD matrices [[1, Z], [0, 1]] of a series impedance, shape (len(Z), 2, 2).

twpasolver.models.rf_functions.lossless_line_abcd(freqs: ndarray[Any, dtype[float64]], C: float, L: float, l: float) → ndarray[Any, dtype[complex128]][source]#

ABCD matrices of a lossless transmission line.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • C (float) – Capacitance per unit length.

  • L (float) – Inductance per unit length.

  • l (float) – Length of the transmission line.

twpasolver.models.rf_functions.LCLf_abcd(freqs: ndarray[Any, dtype[float64]], C: complex, L: float, Lf: float, qp_loss: float = 0.0) → ndarray[Any, dtype[complex128]][source]#

ABCD matrices of an LCLf cell.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • C (complex) – Capacitance (complex for dielectric loss).

  • L (float) – Series inductance.

  • Lf (float) – Finger inductance, in series with C.

  • qp_loss (float) – Quasiparticle-loss coefficient (units 1/Hz).

twpasolver.models.rf_functions.get_stub_cell(freqs: ndarray[Any, dtype[float64]], C: complex, L: float, l1: float, l2: float) → ndarray[Any, dtype[complex128]][source]#

ABCD matrices of a stub cell.

Parameters:
  • freqs (FloatArray) – Frequencies in Hz.

  • C (float) – Capacitance per unit length.

  • L (float) – Inductance per unit length.

  • l1 (float) – Length of the first section of the stub.

  • l2 (float) – Length of the second section of the stub.