Components¤
Use this catalog to choose a component, then follow its link for ports, parameters, equations, and source code. Register component classes or compiled subcircuits in the model mapping passed to compile_circuit; use instance settings to configure their parameters. See Writing Components for the component interface.
Electrical components¤
Passive elements and interconnects¤
| Component | Purpose |
|---|---|
Resistor | Two-terminal resistor with resistance in ohms. |
Capacitor | Two-terminal capacitor with capacitance in farads. |
Inductor | Two-terminal inductor with inductance in henries. |
CoupledInductors | Two magnetically coupled inductors with M = k * sqrt(L1 * L2). |
IdealTransformer | Ideal transformer with turns ratio n = N1 / N2 (n > 0). |
DifferentialAdapter | Lossless bidirectional differential/common to conductor adapter. |
TransmissionLine | Matched bidirectional transmission line with exact fixed delay. |
Sources and controlled elements¤
| Component | Purpose |
|---|---|
VoltageSource | Step voltage source. |
CurrentSource | Constant current source. |
VoltageSourceAC | Sinusoidal voltage source. |
SmoothPulse | Voltage source with a sigmoid-smoothed pulse. |
PulseVoltageSource | SPICE-compatible PULSE voltage source: PULSE(v1 v2 td tr tf pw per). |
WaveformVoltageSource | SPICE voltage source with optional DC override and SIN/PULSE/PWL waveform. |
WaveformCurrentSource | Independent current source with a DC bias and a SIN, PULSE or PWL transient waveform. |
VCVS | Voltage Controlled Voltage Source. |
VCCS | Voltage Controlled Current Source. |
CCVS | Current Controlled Voltage Source: V_out = R * i_ctrl, V_in = 0 (short). |
CCCS | Current Controlled Current Source: I_out = alpha * i_ctrl, V_in = 0 (short). |
IdealOpAmp | Ideal voltage amplifier with configurable open-loop gain. |
VoltageControlledSwitch | Voltage Controlled Switch. |
For waveform definitions and examples, see Waveform Sources.
Semiconductor devices¤
| Component | Purpose |
|---|---|
Diode | Ideal diode using the Shockley equation I = Is * (exp(Vd / n*Vt) - 1). |
ZenerDiode | Zener diode with forward Shockley conduction and reverse breakdown. |
NMOS | N-channel MOSFET with square-law DC model and channel-length modulation. |
PMOS | P-channel MOSFET with square-law DC model, formulated in terms of Vsg and Vsd. |
NMOSDynamic | NMOS with square-law DC model and Meyer gate capacitance model. |
BJT_NPN | NPN BJT using the transport form of the Ebers-Moll DC model. |
BJT_NPN_Dynamic | NPN BJT with the Ebers-Moll DC model and first-order junction charge dynamics. |
The static transistor models describe DC conduction; the dynamic variants also include charge storage. Choose the model according to the dynamics required by your circuit.
Filters¤
| Component | Purpose |
|---|---|
LowPass1 | Unity-DC-gain first-order low-pass; f3db is the -3 dB frequency. |
Biquad | Unity-DC-gain second-order low-pass with -3 dB frequency and quality factor. |
Bessel3 | Unity-DC-gain third-order Bessel low-pass, normalized at -3 dB. |
Photonic components¤
| Component | Purpose |
|---|---|
OpticalWaveguide | Waveguide with optical phase, propagation loss, and first-order dispersion. |
OpticalDelayLine | Waveguide modelled as an explicit time-of-flight delay line (real group delay). |
Grating | Grating coupler with Gaussian wavelength-dependent insertion loss. |
Splitter | Three-port optical splitter with a configurable power split ratio. |
DirectionalCoupler | 4-port directional coupler (2×2 beamsplitter) with configurable power split ratio. |
TunableBeamSplitter | Ideal lossless 2×2 directional coupler with a variable coupling angle. |
OpticalSource | Ideal CW optical source for DC and small-signal AC analysis. |
OpticalSourcePulse | Time-dependent optical source with a sigmoid turn-on profile. |
phase_shifter_factory | Electro-optic phase shifter from voltage-dependent index, loss and optional junction charge. |
pn_diode | Reusable electrical junction with depletion charge and diode current. |
junction_model | Electrical junction from supplied current, charge or capacitance functions. |
delay_line_fdomain | Frequency-domain delay line for AC and harmonic-balance analysis. |
Optical circuits use complex field envelopes. Enable float64 and compile with is_complex=True. Use OpticalDelayLine when explicit propagation delay is needed in a transient simulation; delay_line_fdomain supplies a frequency-domain representation for AC and harmonic balance.
For complete circuits, see the Mach–Zehnder modulator, traveling-wave MZM, photonic transient, and ring modulator tutorials. The traveling-wave tutorial defines its PN phase-shifter component and composes the MZM from electrode and optical sections.
Fitted transmission lines¤
| Component | Purpose |
|---|---|
rlgc_transmission_line | Fit frequency-dependent RLGC per metre and return a line factory. |
mode_transmission_line | Generate a passive RLC line factory from uniform-mode propagation data. |
reduced_rlgc_transmission_line | Create a compact, transient-capable uniform line from RLGC versus Hz. |
characteristic_rlgc_transmission_line | Compact uniform line with fitted characteristic admittance and explicit propagation delay. |
RLGCTransmissionLine | Reusable fitted line; call with a length in metres to create a Circuit. |
These factories construct circuit models from sampled line properties. The Foster ladder uses passive RLC elements; the reduced and characteristic models use rational responses checked for sampled passivity. Start with the reduced RLGC transmission-line example, or use the traveling-wave MZM tutorial to connect modal lines to distributed junction loads. The Fitting API explains the input data and fit controls.
Rational models¤
| Component | Purpose |
|---|---|
rational_component | Create a time-domain component from a rational-fitting SSModel. |
rational_fdomain_component | Create a frequency-domain oracle component from a rational-fitting SSModel. |
rational_delay_component | Create an fdomain component from SSModel + per-port delay. |
rational_component provides a time-domain realization. The frequency-domain factories support frequency-response analysis. See Rational Model Enforcement and the vector-fitting example for fitting and validation.