Tools / Circuit solver
Circuit solver
Describe a DC circuit as a connection list of resistors and sources. The solver gives every voltage, current and power with the equations behind them, shows what each source contributes to any result you choose, and ranks which components that result is most sensitive to.
Start from an example
A current source sits between two loops (a supermesh). The solver needs no special treatment: R2 carries 6 A and R1 carries 3 A.
Connection list
Each row joins two nodes. Name nodes anything you like (1, 2, A, out) and use 0 for ground. Current is positive when it flows From → To through the element. A voltage source raises the voltage from its From node to its To node (To is the + terminal). A current source pushes current from its From node to its To node. Values accept suffixes: 2.2k, 10m, 5u.
| Element | Type | From node | To node | Value | Remove |
|---|---|---|---|---|---|
| V1 | |||||
| R1 | |||||
| I1 | |||||
| R2 |
Result to analyse
✓ Power check passes: sources deliver 108 W and the circuit absorbs 108 W.
- V1 has the biggest effect: changing it by 10 % moves current through R2 (B → 0) by up to 400 mA.
- V1 supplies most of it: 4 A of 6 A.
Circuit map
Arrows show the real direction of conventional current. The map is drawn automatically, so it may differ from a textbook layout.
Every element
| Element | Type | From → To | Value | Current From → To | Voltage From − To | Power |
|---|---|---|---|---|---|---|
| V1 | Voltage source | 0 → A | 24 V | 3 A | −24 V | delivers 72 W |
| R1 | Resistor | A → B | 4 Ω | 3 A | 12 V | absorbs 36 W |
| I1 | Current source | 0 → B | 3 A | 3 A | −12 V | delivers 36 W |
| R2 | Resistor | B → 0 | 2 Ω | 6 A | 12 V | absorbs 72 W |
Node voltages
Contributions
What each source adds to current through R2 (B → 0) when it works alone (superposition).
✓ Together: 4 A + 2 A = 6 A, the same as the full circuit.
Sensitivity
How far current through R2 (B → 0) moves when each component is changed by −10 % and +10 %. The line marks today’s value, 6 A.
Working: node equations
Show the equations
- Node A: − I(V1) + (V(A) − V(B)) / 4 Ω = 0
- Node B: (V(B) − V(A)) / 4 Ω − 3 A + (V(B)) / 2 Ω = 0
- V1: V(A) − 0 = 24 V
Each node equation says the currents leaving the node add to zero. Written as a matrix, G·x = z, with conductances in siemens (S):
| Equation | V(A) | V(B) | I(V1) | Right side | |
|---|---|---|---|---|---|
| Node A | 0.25 | -0.25 | -1 | = | 0 |
| Node B | -0.25 | 0.75 | 0 | = | 3 |
| V1 | 1 | 0 | 0 | = | 24 |
How to read it
The solver uses nodal analysis: for every node except ground it writes that the currents leaving the node add to zero (Kirchhoff’s current law), adds one equation for each voltage source, and solves the lot at once. Because it works node by node, a current source shared by two loops (a supermesh in mesh analysis) needs no special handling.
- Contributions use superposition. Each source is switched on alone while the others are replaced by a short circuit (voltage source) or an open circuit (current source). The contributions add up to the full result.
- Sensitivity changes each component by −10 % and +10 % in turn and shows how far the chosen result moves. S is the normalised sensitivity: the percentage change of the result for a 1 % change of the component.
- Power check: the power delivered by the sources must equal the power absorbed by the resistors. If they differ, something is wrong.
Limits: DC circuits with ideal resistors, voltage sources and current sources. The circuit map is drawn automatically and may be arranged differently from your textbook diagram; the connection list is the exact description.