Electronic – Why doesn’t this RC circuit simulate as expected? (i.e. what am I doing wrong?)

capacitorcircuit analysisresistorssimulation

I am trying to learn about RC circuits. As I understand it, the indicated point in the basic RC circuit below should produce a current and voltage curve like this.
However, when I attempt to simulate the circuit in the embedded CircuitLab and (other online simulators also) I get nothing. I also tried in Digikey's Partsim and got the same results. So it must be something I'm doing wrong…

I chose Time Domain simulation with the following parameters:
enter image description here
(I assume the Time Constant for this circuit is about 1 second, so 2 sec should generate a nice curve…)

I'm measuring V and I at the point indicated.

Here's what I get. Notice the scale shows 9.000V top and bottom, and current 0.000A top and bottom.

enter image description here

It makes no sense! Please tell me where I went wrong! Thank you!

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

The default initial conditions for time domain simulations is almost always the "steady-state" condition assuming all sources were at their \$t=0\$ state since \$t=-\infty\$.

There are a few different fixes for this:

  1. Switch to a time dependent source (like what Jim did with a square wave source)
  2. Disable the "initial condition" solve step, which usually initializes all nodal voltages/branch currents to 0 (when applicable).

  1. Manually specify the initial conditions. Unfortunately, CircuitLab doesn't appear to allow you to do this (other than disabling the "skip initial" step). However, for SPICE-like simulators you can add an .ic command to manually specify the value to use. For example, here I've set the initial conditions V(out)=4V in LTSPICE.

enter image description here

enter image description here