nodeVoltages(N, [f]) MathMath’s own
The voltage at each node of a circuit described by a netlist N, at DC or at a frequency f.
A netlist is a matrix with a row for each part: its name in quotes, its two nodes and its value, as "R1", 1, 2, 10·kΩ. The name's first letter says what the part is: R resistor, C capacitor, L inductor, V voltage source, I current source, O ideal op-amp. An op-amp's row holds its + input, − input and output nodes in place of the nodes and value.
Node 0 is ground. The other nodes are numbered 1, 2, … with none missing. The result lists every node from node 0, so element k is node k's voltage whatever ORIGIN is.
At DC, with no f or f = 0, capacitors are open and inductors are shorts. At f, sources are phasors at that frequency, so a source's value can be complex, as phasor(1·V, 45·deg).
Branch currents come from branchCurrents.
Units
Values can carry units (Ω, F, H, V, A) or be plain numbers in those units. f is in Hz or a plain number of hertz. The voltages are in volts when the netlist has units.
Refused
- A node with no path to ground at this frequency, whose voltage isn't fixed.
- A loop of voltage sources (inductors count, at DC), whose voltages can't all hold.
- An op-amp without feedback, or parts that cancel, leaving no single solution.
- Missing node numbers, no node 0, a name that doesn't start with one of the letters, or a value in the wrong units.