SequentialScatteringCircuitSolver

class pmrf.models.composite.interconnected.circuit.solvers.scattering.SequentialScatteringCircuitSolver(eps: float = 1e-12, linear_solver: AbstractLinearSolver = AutoLinearSolver(well_posed=None))

Bases: AbstractScatteringCircuitSolver

Sequential S-parameter reduction solver (Matrix Contraction).

Physically contracts the S-matrix at each step by dropping eliminated internal ports. Operates sequentially on purely internal nets, then uses a final block Schur complement on the contracted matrix to resolve external boundaries. Unrolls the circuit topology into the algorithm, which may result in increased compile times.

Best suited for long chain-like/separated networks, though consider using an explicit Cascade if possible.

run(s_block_diagonal: Array, z0_ports: Array | None, z0_ext: Array | None, topology: PortRepresentation) ScatteringResult

Executes the scattering circuit solving algorithm.

Note on Dangling Ports

Implementations MUST safely handle mathematically isolated external ports (where a port in topology.ext_idx is the ONLY port on its defined net). To prevent solvers from evaluating these as perfect open circuits (S=1.0), implementations should dynamically inject matched virtual VNA probes (e.g., padding the S-matrix with 0.0s and rewiring the indices) prior to solving.

param s_block_diagonal:

A 2D array of shape (N_total, N_total) containing the uncoupled S-parameters of all components placed sequentially along the main diagonal. All off-diagonal elements are exactly zero.

type s_block_diagonal:

jnp.ndarray

param z0_ports:

A 1D array of shape (N_total,) containing the characteristic impedances for all ports.

type z0_ports:

jnp.ndarray

param topology:

The static map dictating the port connections, nets, and partition logic.

type topology:

PortRepresentation

returns:

The fully solved S-parameter result.

rtype:

ScatteringResult

eps: float = 1e-12
linear_solver: AbstractLinearSolver = AutoLinearSolver(well_posed=None)