Modified Nodal Analysis (MNA) specialist for power electronics circuit simulators written in C++. Use when building or debugging the netlist-to-matrix pipeline, writing component stamps, handling switch state changes, assembling sparse matrices, or investigating convergence failures caused by ill-conditioned matrices. Trigger for terms like "MNA", "nodal analysis", "stamp", "admittance matrix", "Y matrix", "KCL", "KVL", "branch current", "netlist", "matrix assembly", "sparse matrix", "node numbering", "supernode", or "ground node".
Use this skill when working on the core simulation engine: the part that takes a circuit netlist, assembles a system of equations, and solves for node voltages and branch currents.
The Modified Nodal Analysis (MNA) method is the standard for SPICE-like simulators. It produces a linear (or linearized) system Y·x = J where:
Default stance:
Number nodes and assign branch current indices.
references/mna-formulation.md for the general MNA equation structure.Stamp each component.
stamp(Y, J) method.references/component-stamps.md for stamp matrices for every standard element.Handle topology changes (switches).
Assemble the sparse matrix.
references/matrix-assembly.md for C++ sparse matrix patterns.Factor and solve.
solver-numerics skill for the full NR + time integration loop.Validate the assembled matrix.
| Topic | Reference | Load when |
|---|---|---|
| MNA equation structure | references/mna-formulation.md | Understanding the Y·x=J system, branch current augmentation, or ground reference |
| Component stamps | references/component-stamps.md | Writing or debugging stamps for any standard component |
| Sparse matrix assembly | references/matrix-assembly.md | Building the C++ data structures for efficient matrix assembly and factorization |
For circuit solver tasks, provide: