Inductor¶
- class photonforge.Inductor(*, inductance, port_map=None)[source]¶
Two-terminal inductor.
MNA branch equation: auxiliary current \(I\) with \(V(t_1) - V(t_2) = j\omega LI\). Finite at all frequencies including DC.
Circuit diagram:
L t1 ---nnnnn--- t2
- Parameters:
inductance (Annotated[float, minimum=0, units='H']) – Inductance.
port_map (dict[str, tuple[str, Annotated[complex, units='Ω']] | tuple[str, str, Annotated[complex, units='Ω']]] | None) – Port mappings from terminals (see
LumpedModel).
Example
>>> inductor = pf.Inductor(inductance=1e-9) # 1 nH
Methods
autograd_smatrix(*, component, ...[, ...])Compute an autograd-compatible S matrix for traced parameters.
estimate_cost(*args, **kwargs)Estimate the cost for S matrix computation.
s_matrix(component, frequencies[, ...])Compute the S matrix for a component using this lumped model.
setup_time_stepperNot supported for lumped models.
start(component, frequencies, **kwargs)Start the S-matrix computation for this lumped model.
start_mna(component, frequencies, **kwargs)Start the MNA matrix computation for this lumped model.
transform([translation, rotation, scaling, ...])Apply a transformation to this model.
update(*args, **kwargs)Update this lumped model.
Attributes
parametric_functionFunction used to update a parametric component.
parametric_kwargsKeyword arguments used to update a parametric component.
port_mapMapping from port names to (signal_terminal, impedance) or (signal_terminal, reference_terminal, impedance) tuples.
propertiesObject properties.
random_variablesRandom variables associated to this model's parameters.
time_stepperLumped models do not use time steppers.
- start_mna(component, frequencies, **kwargs)[source]¶
Start the MNA matrix computation for this lumped model.
Important
This is an abstract method that must be implemented by derived classes.
Return an
MNAMatrixcontaining the MNA stamp for this component, if the calculation can be performed synchronously.Otherwise, it must return an object with attributes
statusandmna_matrixthat will be pooled to check the calculation progress. Thestatusattribute must return a dictionary with'progress'(a number from 0 to 100 indicating the calculation progress) and'message'(one of'running','success', or'error', indicating the current calculation status). The'mna_matrix'attribute should return the computedMNAMatrixonce the calculation is successful (orNoneotherwise).Terminal naming convention: Terminal names starting with
_are reserved for auxiliary branch-current variables (e.g.,_Ifor an inductor branch current,_I1/_I2for transmission line branch currents). User-defined terminal names for physical nodes should not start with_to avoid collisions when elements are composed inside a futureLumpedCircuitModel.- Parameters:
component (Component) – Component to perform the calculation.
frequencies (Sequence[float]) – Frequency values at which to calculate the matrix parameters (in Hz).
**kwargs (object) – Additional keyword arguments.
- Returns:
Either an MNA matrix directly, or a runner with
statusandmna_matrixattributes.- Return type:
MNAMatrix | object