pyrc.core.solver.stationary#
- solve_stationary(system_matrix: csr_matrix | MutableDenseMatrix | MutableSparseMatrix | ImmutableSparseMatrix | spmatrix | sparray, input_matrix: csr_matrix | MutableDenseMatrix | MutableSparseMatrix | ImmutableSparseMatrix | spmatrix | sparray = None, input_vector: ndarray | MutableDenseMatrix | sparray = None) ndarray | MutableDenseMatrix#
Solve the stationary solution of a linear RC network: x = -A⁻¹ · B · u.
Dispatches to a numeric (scipy sparse) or symbolic (sympy) solver based on whether free symbols are detected in the inputs. A purely numeric sympy matrix is converted and solved numerically. For homogeneous systems,
input_matrixandinput_vectorcan be omitted, returning the zero vector.- Parameters:
system_matrix (csr_matrix | sp.Matrix | MutableSparseMatrix | ImmutableSparseMatrix | spmatrix | sparray) – System matrix (Jacobian) of shape (n, n).
input_matrix (csr_matrix | sp.Matrix | MutableSparseMatrix | ImmutableSparseMatrix | spmatrix | sparray, optional) – Input matrix of shape (n, m). Must be provided together with
input_vector.input_vector (np.ndarray | sp.Matrix, optional) – Input vector of shape (m,) or (m, 1). Must be provided together with
input_matrix.
- Returns:
Stationary temperature vector of shape (n,) for numeric, (n, 1) for symbolic.
- Return type:
np.ndarray | sp.Matrix | MutableDenseMatrix
- Raises:
ValueError : – If only one of
input_matrixandinput_vectoris provided.ValueError : – If the system matrix is singular.