circuitjs1 icon indicating copy to clipboard operation
circuitjs1 copied to clipboard

Batteries that actually 'run down'

Open UFTL opened this issue 3 years ago • 0 comments

Hi, I had an idea for the Falstad.com circuit simulator... batteries that actually run down.

How? You'd have a checkbox in the 'Edit' dialog box for the voltage source which allows one to designate it as a battery, and a text box that allows one to put in the amp-hours of that battery. The circuit simulator then analogizes it to a capacitor thusly:

Two 12 V batteries (floating at 14 V each) in series, each battery with 100 Ah capacity... giving essentially a 28 V 100 Ah battery.

28 V * 100 Ah * 3600 s = 10,080,000 J

From the capacitor work equation:

W = 0.5 * C * V^2

10,080,000 J = 0.5 * C * 28^2

C = 25714.285714285714285714285714286 F

So while the circuit symbol in the simulator would still show a voltage source, in reality the code is treating it like a whomping huge cap.

UFTL avatar Feb 10 '22 07:02 UFTL