Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Nodes (row k is node k; leave a row blank when the node is not used) (required)
-
Default 3 rows
About this input
Up to 10 nodes. Row k is node k, placed at a grid point: x and y whole numbers from 0 to 10. Leave a row blank for a node you do not use; two nodes may not share a point.
Column Range or allowed values Grid x 0 to 10 Grid y 0 to 10 - Equivalent resistance: node A (required)
-
Default 3 Range 1 to 10
About this input
The first of the two nodes between which the equivalent resistance is measured. A node in use, 1 to 10.
- Equivalent resistance: node B (required)
-
Default 1 Range 1 to 10
About this input
The second node for the equivalent resistance: a node in use, different from node A.
- Branches (row b is branch b; current is positive from the From node to the To node) (required)
-
Default 3 rows
About this input
Up to 20 branches. Row b is branch b: a From node, a To node, a type (Resistor, Voltage source or Current source) and a value: a resistance of 1 to 1,000,000 ohms, a voltage of -100 to 100 V (the To node is the + terminal) or a current of -10 to 10 A (driven from the From node to the To node). Leave a row blank for a branch you do not use.
Column Range or allowed values From node 1 to 10 To node 1 to 10 Type Resistor, Voltage source, Current source Value (ohm, V or A) -1000000 to 1000000 - Challenge number (required)
-
Default 0 Range 0 to 5
About this input
0 for none, or 1 to 5 to score your network against a challenge: a voltage divider, a 750-ohm combination, a balanced bridge, a node held at 0 V, a matched load.
- Ground node (required)
-
Default 1 Range 1 to 10
About this input
The node held at 0 V; every node voltage is measured from it. A node in use, 1 to 10.
Outputs
- Nodes in use
-
No unit declared
About this output
How many rows of the node table are in use.
- Node voltages
-
No unit declared
About this output
The voltage of every node in use, measured from ground, in volts.
- Model version
-
No unit declared
About this output
The version of the workbook model that produced these results.
- Formula module versions
-
No unit declared
About this output
The versions of the formula modules inside the workbook: the network solver and the challenge scoring.
- The solved system: modified nodal analysis
-
No unit declared
About this output
The system of equations the workbook solved: one row per unknown (a node voltage v or a voltage-source current i), the coefficients, the right-hand side and the solution.
- Unknowns in the solved system
-
No unit declared
About this output
How many unknowns the solved system has: the node voltages other than ground plus one current for each voltage source.
- Power absorbed by the resistors (W)
-
No unit declared
About this output
The total power the resistors absorb as heat, in watts.
- Net power delivered by the sources (W)
-
No unit declared
About this output
The net power the voltage and current sources deliver to the circuit, in watts. It equals the power the resistors absorb.
- Model Status
-
No unit declared
About this output
OK when the network is solved; CHECK when it is solved but has no source; NOT VALID with the node or branch to fix when it cannot be solved (a missing value, a floating node, a loop of voltage sources).
- Challenge feedback
-
No unit declared
About this output
A hint for the selected challenge, or why it is met; blank with no challenge.
- Challenge goal
-
No unit declared
About this output
What the selected challenge asks for; blank with no challenge.
- Branches in use
-
No unit declared
About this output
How many rows of the branch table are in use.
- Branch results
-
No unit declared
About this output
Every branch in use: its type and nodes, the voltage across it (From minus To), its current (positive from the From node to the To node) and direction, the power it absorbs (negative when it delivers) and whether it absorbs or delivers.
- Challenge result
-
No unit declared
About this output
No challenge selected, MET or NOT MET.
- Equivalent resistance between nodes A and B (ohm)
-
No unit declared
About this output
The resistance between nodes A and B with every source switched off (voltage sources shorted, current sources opened): the voltage a 1 A test current produces between them. In ohms.
- Challenge: the value scored
-
No unit declared
About this output
The value the selected challenge scores: a node voltage in V, the equivalent resistance in ohms, a branch current in A or a branch power in W.
- Challenge score
-
No unit declared
About this output
100 when the selected challenge is met, otherwise 0.
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
This lab solves a direct-current (DC) network that you draw on the page: up to 10 nodes on a grid and up to 20 branches between them, each a resistor, an ideal voltage source or an ideal current source. For the network as drawn it returns the voltage of every node measured from a ground node, the current in every branch with its direction, the power each element absorbs or delivers, the total power of the sources and of the resistors, the equivalent resistance between two nodes you choose, and the full system of equations it solved. It also scores five challenges. It is a model of ideal DC circuits for learning nodal analysis. It is not a design or safety check: it models no alternating current, capacitors, inductors, diodes, transistors or dependent sources, no internal resistance of real sources, and no resistor tolerance, temperature or power rating.
The model is the calculation authority. The page sends the circuit you draw and the values you set to the model and draws only what the model returns; it computes no electrical value itself.
Inputs and units
| Input | Meaning and unit |
|---|---|
| Nodes | A table of 10 rows: row k is node k, placed at a grid point with Grid x and Grid y, each a whole number from 0 to 10. A node is in use when either cell is filled; leave a row blank for a node you do not use. Two nodes may not share a grid point. |
| Branches | A table of 20 rows: row b is branch b, with a From node, a To node (whole numbers 1 to 10, two different nodes in use), a Type and a Value. A branch is in use when any of its four cells is filled; blank rows are allowed anywhere. |
| Branch type | Resistor, Voltage source or Current source. |
| Branch value | A resistor's resistance in ohms, from 1 to 1,000,000; a voltage source's voltage in V, from -100 to 100; a current source's current in A, from -10 to 10. |
| Ground node | The node held at 0 V, a node in use (1 to 10). Every node voltage is measured from it. |
| Equivalent resistance: node A and node B | The two nodes between which the equivalent resistance is measured: two different nodes in use. |
| Challenge number | 0 for none, or 1 to 5 to score your network against a challenge. |
Sign conventions:
- Every branch runs from its From node to its To node. Its current is positive when it flows from the From node to the To node through the element.
- A voltage source's + terminal is its To node: v(To) − v(From) = E. A source of 12 V from node 1 to node 2 puts node 2 12 V above node 1; a negative value reverses it.
- A current source drives its current I out of the From node and into the To node.
- The voltage across a branch is v(From) − v(To). Power absorbed is positive; a negative power means the element delivers power.
Where each input is set: the node table, the branch table, the ground node and the two equivalent-resistance nodes are set only on the canvas. You tap an empty grid point to add a node and drag a node to move it; you draw a resistor, voltage source (from the − node to the + node) or current source (in the direction it drives its current) by dragging from one node to another; you tap an element to change its value or type, or to remove it; the Ground choice picks the ground node, and choosing Req A–B picks node A and then node B. The challenge number is set in the input panel.
Governing relationships
The model solves the network by modified nodal analysis. It writes Kirchhoff's current law at every node in use other than ground, with each resistor as a conductance G = 1/R between its two nodes and each current source on the right-hand side, and adds one equation per voltage source, v(To) − v(From) = E, whose current becomes an extra unknown.
- Unknowns, in this order: the voltages of the nodes in use other than ground, by ascending node number (labelled v3, for example), then the currents of the voltage sources in use, by ascending branch number (labelled i(b1), for example). There are at most 18: nine node voltages and nine source currents.
- Node row j, node column k: for j = k, the sum of G over the resistors that touch node j; otherwise minus the sum of G over the resistors joining nodes j and k.
- Node row j, voltage-source column b: +1 when the source's From node is j, −1 when its To node is j.
- Voltage-source row b: −1 in the column of its From node, +1 in the column of its To node, 0 elsewhere; its right-hand side is E.
- Right-hand side of node row j: the sum of +I for each current source whose To node is j and −I for each whose From node is j.
The system M · x = rhs is padded to 18 × 18 with an identity block and solved with the model's matrix inverse: x = M⁻¹ · rhs. Ground reads 0 V.
From the solution, for each branch in use:
- voltage across = v(From) − v(To);
- current = voltage across / R for a resistor, the solved unknown for a voltage source, and the value I for a current source;
- power absorbed = voltage across × current.
The net power delivered by the sources is minus the sum of the source powers; the power absorbed by the resistors is the sum of the resistor powers. In a solved network the two agree, which is the power balance.
Equivalent resistance. The model solves the same matrix M again with a second right-hand side: +1 in the row of node A, −1 in the row of node B (a ground node has no row), and 0 in every voltage-source row. This is a 1 A test current into node A and out of node B with every source switched off: voltage sources shorted (E = 0) and current sources opened (I = 0). The equivalent resistance is Req = y(A) − y(B), the voltage the test current produces between the two nodes.
Before solving, two checks over the branch list refuse a network that has no unique solution, each run for 9 rounds, enough to reach every node of a 10-node network:
- Grounded: starting from the ground node, a node becomes connected when a resistor or voltage source joins it to a connected node. A node in use that is never reached, including one joined to the rest only through current sources, is floating: its voltage is undefined.
- Voltage-source loop: nodes joined by voltage sources are grouped. With NV voltage sources, NU nodes in use and C groups, the sources form a loop exactly when NV > NU − C. Two voltage sources between the same two nodes count as a loop, even when their values agree.
Snapping: any voltage, current, power or resistance result smaller than 1×10⁻¹² in size reads 0.
Calculation sequence
The model works through the relationships above in this order:
- It checks the node table, the ground node, the branch table, the equivalent-resistance nodes and the challenge number, in the order of the status table under Errors and warnings.
- Before solving, it runs the grounded check and the voltage-source loop check. Under NOT VALID no matrix is formed.
- It builds the modified nodal analysis system M · x = rhs and solves it for the node voltages and the voltage-source currents.
- From the solution it finds each branch's voltage across, current and power, and the power balance.
- It solves the same matrix again with the test right-hand side for the equivalent resistance.
- Results smaller than 1×10⁻¹² in size read 0. It sets the status and, in a challenge, scores the challenge.
Outputs and interpretation
- Status: OK, CHECK or NOT VALID with the reason (see Validation and status logic and Errors and warnings).
- Node voltages: one row per node in use, its number and its voltage from ground in V, shown to six decimals. Unused rows are blank.
- Branch results: one row per branch in use: the branch number, type, From and To nodes, the voltage across it (From minus To) in V, its current in A, its direction ("from 2 to 3", "from 3 to 2" or "no current"), the power it absorbs in W, and its role ("absorbs", "delivers" or "none"). A source that powers the circuit shows a negative power and the role "delivers". Unused rows are blank.
- Equivalent resistance between nodes A and B (ohm): with every source switched off. Two nodes joined by a voltage source, or by a chain of voltage sources only, read 0 ohms, because every voltage source is shorted for this test.
- Net power delivered by the sources (W) and Power absorbed by the resistors (W): the two sides of the power balance.
- Nodes in use, Branches in use, Unknowns in the solved system: the counts; the node and branch counts are shown even when the network is not valid.
- The solved system (modified nodal analysis): one row per unknown, with its label, its coefficients in columns c1 to c18, the right-hand side and the solution. Rows and columns beyond the number of unknowns are blank.
- Model version and formula module versions of the model.
On the canvas each branch is labelled with its value, and the node voltages and branch currents are drawn from the grids the model returns.
Challenges
Choose a challenge number from 1 to 5. The model scores your own network as entered; nothing is replaced. It shows the goal, MET or NOT MET, a score of 100 when met (0 otherwise), the value it scored and a hint.
- A voltage divider: make node 2 read 3 V, within 0.01 V, using the given 12 V source on branch 1 and resistors only.
- A combination: build 750 ohms between nodes 1 and 2, within 0.5 ohm, from 1,000-ohm resistors only, with no source.
- A bridge: choose the resistance of branch 5 so that no current flows through the 500-ohm bridge on branch 6 (its current within 0.000001 A of zero).
- Holding a node: set the current source on branch 4 so that node 3 sits at 0 V, within 0.001 V.
- A matched load: choose the load resistance on branch 4 so that it absorbs at least 99% of the most power it can take.
A challenge counts only when the network is valid, node 1 is ground, the challenge's fixed branches stay as given (same type, nodes and value; a fixed resistor may be entered in either direction), no source is added beyond the fixed ones, and, for challenges 3 to 5, the number of branches is as given. Challenge 2 also needs every resistor at 1,000 ohms and the equivalent-resistance nodes set to 1 and 2. The scored value is blank, and the challenge NOT MET, when the network is not valid or the node or branch it measures is not in use.
Validation and status logic
The status reads the first condition that applies, in the order of the table under Errors and warnings (N, J and B name the lowest node or branch row that fails). The input checks come first, then the grounded and voltage-source loop checks, then the CHECK for a network with no source, then OK.
Assumptions and limitations
- At most 10 nodes on an 11 × 11 grid (0 to 10) and 20 branches; at most 18 unknowns.
- Resistances from 1 to 1,000,000 ohms; source voltages from −100 to 100 V; source currents from −10 to 10 A.
- Ideal elements only: linear resistors, voltage sources with no internal resistance and ideal current sources, in the DC steady state.
- Results smaller than 1×10⁻¹² in size read 0, so a balanced bridge shows 0 A and "no current" rather than a rounding remainder.
- The power column is not compared with any rating; real resistors need a power margin this lab does not check.
Restrictions and non-computing states
Under NOT VALID no matrix is formed and every result is blank, except the node and branch counts, the version texts and the challenge outputs.
Errors and warnings
The status messages, in the order they are checked:
| Status | Trigger |
|---|---|
| NOT VALID: node N needs both grid coordinates as whole numbers from 0 to 10, or neither | A node in use has a blank, fractional or out-of-range coordinate. |
| NOT VALID: nodes J and N are on the same grid point | Two nodes in use share a point. |
| NOT VALID: at least two nodes are needed | Fewer than two nodes are in use. |
| NOT VALID: the ground node must be a node in use | The ground node is not a node in use. |
| NOT VALID: branch B needs a type: Resistor, Voltage source or Current source | A branch in use has no valid type. |
| NOT VALID: branch B must join two different nodes in use | A From or To node is not in use, or From equals To. |
| NOT VALID: branch B has a value outside its range (resistor 1 to 1,000,000 ohms, voltage source -100 to 100 V, current source -10 to 10 A) | A value is blank or outside its type's range. |
| NOT VALID: at least one branch is needed | No branch is in use. |
| NOT VALID: the equivalent-resistance nodes must be two different nodes in use | Node A or B is not in use, or they are the same node. |
| NOT VALID: the challenge number must be a whole number from 0 to 5 | The challenge number is blank, not a whole number, or outside 0 to 5. |
| NOT VALID: node N is floating: no path of resistors or voltage sources joins it to ground, so its voltage is undefined | The grounded check fails. |
| NOT VALID: the voltage sources form a loop (two in parallel count), so their voltages conflict | The voltage-source loop check fails. |
| CHECK: the network has no source, so every voltage and current is 0; the equivalent resistance is still computed | The network is valid but has no voltage or current source. |
| OK | The network is solved. |
References
This laboratory is an educational model of ideal DC circuits of resistors, voltage sources and current sources. It solves the network by modified nodal analysis: Kirchhoff's current law at every node other than ground, with each resistor as a conductance, plus one equation for each voltage source, whose current becomes an extra unknown. Before solving, it refuses a floating node or a loop of voltage sources. The equivalent resistance between two nodes is the voltage that a 1 A test current produces between them with every source switched off, as in finding a Thevenin equivalent.
Sources and further reading
- The modified nodal formulation used here: C.-W. Ho, A. E. Ruehli and P. A. Brennan, "The modified nodal approach to network analysis", IEEE Transactions on Circuits and Systems 22(6), 1975, pages 504-509. doi:10.1109/TCS.1975.1084079
- Nodal analysis with voltage sources, and Thevenin equivalents: C. K. Alexander and M. N. O. Sadiku, Fundamentals of Electric Circuits, 7th edition, McGraw-Hill, 2021, chapter 3, Methods of Analysis, and chapter 4, Circuit Theorems.
- Kirchhoff's junction and loop rules, at an introductory level: S. J. Ling, J. Sanny and W. Moebs, University Physics Volume 2, OpenStax, 2016, section 10.3, Kirchhoff's Rules. OpenStax
No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.
This laboratory is for learning. Its results hold only within its stated ranges; real components have tolerances, internal resistance and power ratings that it does not model.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.