circuitjs1
circuitjs1 copied to clipboard
Capacitor Trapezoidal Approximation code problem?
I think the Trapezoidal Approximation code for capacitors is acting up.
Run this: https://tinyurl.com/ybwyu6cq
Note that despite the fact that the left-most 100 uF cap is set at an initial voltage of 28 V (to match the 28 V of the battery), current still flows.
Now turn off Trapezoidal Approximation for the left-most 100 uF cap. No current flows, just as it should be.
I suspect this is caused by roundoff error. Your timestep is set to 1 picosecond! That's extremely small, and apparently it's causing issues with capacitors that large.