...
running...
The science
The network is solved with Kirchhoff laws by nodal analysis. With node A after the internal resistance and node B after R1:
(EMF - V_A)/r = (V_A - V_B)/R1 = V_B/R2 + s V_B/R3
which is a 2x2 linear system solved by Gaussian elimination (Cramer's rule). The independent check uses the equivalent resistance R_eq = r + R1 + R2 R3/(R2+R3). Energy conservation requires EMF I = I^2 r + I^2 R1 + V_B^2/R2 + s V_B^2/R3: the battery power equals the heat in every resistor. The power delivered to a load R_L fed through a source resistance R_s = r + R1 is P = EMF^2 R_L/(R_s + R_L)^2, maximal at R_L = R_s (maximum power transfer theorem).
Simplifications: ideal wires, resistances independent of temperature (real lamp filaments change resistance by roughly a factor of ten when hot), DC steady state only.
What is checked and why you can trust it
Every time the page loads, and whenever you press Re-run check, the simulation evaluates its own mathematics against an independent reference, such as a closed-form formula, a finite-difference derivative or an exhaustive count. Each line above reports PASS or FAIL together with the measured numbers, so you can see by how much it agrees. Results are also published on window.__msChecks for automated testing. The check never uses the same code path as the animation it validates, otherwise it would only confirm itself.
How to read a failure: a FAIL line means the measured discrepancy exceeded the stated tolerance for the current slider values. Try Reset, then move the sliders back toward their defaults; if a check still fails at the defaults it is a bug worth reporting. Tolerances are chosen from the numerical method itself, never tuned to make a test pass: round-off level (1e-9) for exact algebra, about 1e-3 for finite differences and Monte Carlo estimates with a few hundred thousand samples, and a documented margin for stochastic learning runs.
Reproducibility: the particle and pen simulations use the browser random generator for initial positions, so exact pixels differ between visits, but the checks depend only on mathematics and not on those positions. Fixed wave tables (curl noise) and fixed grammars (L-system) are deterministic.
This is an educational model. It shows the mechanism clearly, but it is deliberately simplified; the science panel lists what was left out.