Skip to content

Multiple batteries are each solved as if the others were 0-ohm wires #11

Description

@EnesYilmazcode

circuit3d/js/simulate.js:356 iterates batteries and solves each one separately:

bats.forEach((bat, bi) => { ... });

Every other battery in the circuit is treated as an ordinary path element with no voltage contribution, which is electrically a zero-ohm wire. Two 9V batteries in series report the same current as one. Two in opposition report current where there should be none.

Should be

A proper solver handles multiple independent sources natively, as simultaneous stamps in one matrix. This is another consequence of the missing node-voltage solve rather than a separate bug, so it should be fixed by the same change and is filed here so it is not forgotten when that lands.

Blocked on the solver decision.


Found in the 2026-08-16 audit (30-agent sweep, 481 findings). Every line reference was verified against main at the time of filing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-decisionNeeds a call before implementationengineCircuit simulation engine

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions