1
\$\begingroup\$

I am using the Falstad simulator.

I do not understand why am I getting a DC current through a capacitor in simulation.

enter image description here

This must be an error from the simulator. Please, let me know if I am sane, I don't get why there is current flowing.

\$\endgroup\$
4
  • \$\begingroup\$ wild guess: what's your time scale? Are you sure this is actually a constant current? (Hint: if I ask that way....) this really feels like you want to revisit how current through a capacitor depends on the time-dependent voltage. \$\endgroup\$ Commented Apr 16, 2021 at 17:36
  • 1
    \$\begingroup\$ Try to put a small resistance (0.1R) in series with the capacitor. And restart the simulation. \$\endgroup\$
    – G36
    Commented Apr 16, 2021 at 18:13
  • \$\begingroup\$ I'm suprised this works at all - Falstad won't let you connect a direct-cap loop like that. You can post the sim by using "export as link" then pasting the long URL as a link reference. Then we can have a go and see what it's doing. \$\endgroup\$ Commented Apr 16, 2021 at 18:34
  • \$\begingroup\$ Nothing beats letting out the magic smoke for real. Because you rely on creating things from formulas, than guess the part and simulate it. \$\endgroup\$ Commented Apr 16, 2021 at 19:18

1 Answer 1

4
\$\begingroup\$

Looks like you found a convergence corner case.

  • Cap directly connected to voltage source: Falstad detects the cap loop and says no.
  • Cap connected via ground: Falstad doesn't detect the loop, oscillates (what you're seeing.)
  • Cap connected via resistor to ground: Varies. Below 100 mohm, won't settle down. Above 100 mohm, converges.

Here's my sim (clicky here):

enter image description here

Point being, avoid direct capacitor (and inductor) loops to fixed sources. These always cause trouble with SPICE and its derivatives.

\$\endgroup\$
1
  • \$\begingroup\$ Convergence is hard. Since it's been distilled into a simple test case, the OP may want to report this bug to Falstad so they get a chance to fix it. For the CircuitLab circuit simulator we've been able to permanently fix many convergence issues from user bug reports over the years. Most recently 3 weeks ago thanks to an EE.SE question. \$\endgroup\$
    – compumike
    Commented Apr 16, 2021 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.