I(V1)R1V1R2C1GCIeq10 V1 kΩ1 kΩ1 µFv(1) = 10.00 Vv(2) = 5.00 VI(V1) = −5.00 mAGC = 10 mSIeq = 0.00 mA
NETLIST → MNA MATRIX1RC divider charging2V1 1 0 DC 103R1 1 2 1k4R2 2 0 1k5C1 2 0 1u IC=06.op7.tran 0.1m 3m UIC8.endv1v2I(V1)=000v10000v20000iV0A · x = b (A in S, b in A; m = milli)00.511.522.530123456t (ms)Vv(2) AGAINST TIMEh = 10 µsexacth = 0.1 mst = 0.00 msτ
Lit wire: current is flowing along itBlocks: V1, R1, R2, C1 and ground, each with its IEEE symbol; in the dashed box, C1's model for one time stepMoving dots: charge; they move faster where the current is largerPanels: the netlist and its matrix, and v(2) against time, computed by the modelV1 = 10 V, R1 = R2 = 1 kΩ, C1 = 1 µF starting empty. The figure is an ideal circuit: a 10 V source, two 1 kΩ resistors and a 1 µF capacitor. Every voltage, current, matrix entry and plot point is computed by the lesson's own small solver, the same modified nodal analysis SPICE uses, not by running a real SPICE.

The netlist

  1. SPICE is a program that solves circuits. You describe the circuit as a netlist: plain text, one line per part. Each line gives the part's name, the two nodes it joins and its value. The first line is only a title.

DC operating point

Transient analysis

What is happening

# step 1/11 · netlist
# about: V1 (10 V), R1, R2, C1, Netlist line 1, Netlist line 2, Netlist line 3, Netlist line 4, Netlist line 5

the netlist (input deck)

 1  RC divider charging
 2  V1 1 0 DC 10
 3  R1 1 2 1k
 4  R2 2 0 1k
 5  C1 2 0 1u IC=0
 6  .op
 7  .tran 0.1m 3m UIC
 8  .end

line 1 is always the title: SPICE skips it.
Lines starting with . are commands.
SPICE: Simulation Program with Integrated
Circuit Emphasis, UC Berkeley, 1973.

The figure is an ideal circuit: a 10 V source, two 1 kΩ resistors and a 1 µF capacitor. Every voltage, current, matrix entry and plot point is computed by the lesson's own small solver, the same modified nodal analysis SPICE uses, not by running a real SPICE. The figure steps time with backward Euler and a fixed 0.1 ms step because it is the easiest companion model to see. ngspice uses the trapezoidal rule by default (or Gear), and adjusts the step from a truncation-error estimate, so its waveform lies much closer to the exact curve.