sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.29k stars 633 forks source link

Total resistance not shown if two voltage sources exist in one sketch #594

Open K0rrid0r opened 3 years ago

K0rrid0r commented 3 years ago

If two voltage sources exist in one sketch total resistance is not shown for any circuit.

image everything like normal here.

image but what's up with this?

also why are these two circuits showing completely different values? image https://tinyurl.com/yz2juefa

pfalstad commented 3 years ago

Yes, we only show resistance if there's only one voltage source in the circuit. Because otherwise we'd have to analyze the circuit more carefully to determine whether the voltage sources are connected, and this feature didn't seem important enough to make that worth the effort.

These two circuits do not have explicit ground, so the simulator has to choose, and in this case it chose poorly. Add a ground node to both, and then they will be the same: https://tinyurl.com/yfooogcp