# Invert a matrix only on a subset of variables / Compute the “equivalent circuit”

Suppose I have a complicatedly shaped conductor with inhomogeneous conductivity. The conductor is modeled using the Finite Element Method. The conductor has electrical contacts on both ends. Those contacts are represented in the FEM mesh by a couple of nodes on either end of the conductor.

Now, I'd like to simulate current and voltage on both contacts. Basically, I could just solve the whole FEM system of the conductor, for example by inverting the whole system matrix. But in fact, I'm only interested in the values on the nodes representing the contacts.

So when inverting the system, I do not need to find a matrix that contains the relationship from any node to any node, but just a matrix, that contains the relationship between all contact nodes.

I still could compute the inverse of the whole system matrix, and then cut-out only the relevant rows and columns. But that would be a waste of resources.

Is there a way to directly compute the inverse of a matrix representing an equation system only for a subset of it's variables? Same for iterative solution of only a subset of variables.

• if the behavior at the contacts is dependent on what's going on along the conductor (which i suspect is the case), then no, i don't believe you can't simply ignore the "in-between" part (the mathematical reasons for this being that the equations are coupled, i.e., the DoFs inside your domain are coupled with those on/near the boundary). What you could consider is some sort of model reduction (simplify the equations for the interior part to get a smaller/sparser linear system) or a multigrid/adaptive mesh approach, where the interior mesh is very coarse. – GoHokies Jun 10 '17 at 10:44
• I think it should be possible, it's like computing an equivalent circuit between all boundary nodes. We can always compute the equivalent resistance between two boundary nodes. Since the system is linear, a superposition of all boundary-boundary equivalent resistances should result in a full description of everything that happens on the boundary. Nevertheless, multigrid and model reduction could also help to compute this relationships. And of course I'm very open if someone can prove me wrong. – Michael Jun 10 '17 at 14:29
• You might be interested in the Schur complement method. – Jakub Klinkovský Jun 10 '17 at 15:09
• It is unclear to me what you are asking. If you are looking for the algorithm to compute a reduced set of equations, that contain only the contact DOFs, from the full set of equations, that is straightforward. If you are looking for a method that avoids the work of dealing with the full set of equations, that is much more difficult. – Bill Greene Jun 10 '17 at 18:10
• @BillGreene: I'm looking to compute a set of equations that contain only the contact DOFs, exactly. That will result in a matrix. I also need the inverse of this matrix. I hope to compute this inverse directly from the original matrix. – Michael Jun 11 '17 at 10:37

$$\left[\begin{array}{cc} K_{cc} & K_{ci} \\ K_{ic} & K_{ii} \\ \end{array}\right] \left\{\begin{array}{c} V_c \\ V_i \end{array}\right\} = \left\{\begin{array}{c} Q_c \\ Q_i \end{array}\right\}$$ where the subscript $c$ refers to the contact degrees of freedom and $i$ refers to the internal degrees of freedom in your model. Form the lower set of equations, you can then obtain an expression for $V_i$ in terms of $V_c$ $$V_i = K_{ii}^{-1} (Q_i - K_{ic}V_c)$$ Substituting this expression into the upper set of equations yields $$K_{cc}V_c + K_{ci}(K_{ii}^{-1} (Q_i - K_{ic}V_c)) = Q_c$$ which can be rearranged to give $$(K_{cc} - K_{ci}K_{ii}^{-1}K_{ic})V_c = Q_c - K_{ci}K_{ii}^{-1} Q_i$$ with only the $V_c$ set of unknowns.
This process can be interpreted as is just a reordering of the original equations and then solving for only the $V_i$ degrees of freedom.
Particularly in structural finite element analysis, the matrix, $K_{cc} - K_{ci}K_{ii}^{-1}K_{ic}$, is often described as the stiffness matrix for the "substructure" or "superelement". That is, you have created a new "element" that describes the behavior in terms of only the contact degrees of freedom.