Docs Getting started First simulation
First simulation
Run your first transient analysis in under a minute: a series RLC driven by a voltage step. Every number on this page comes from actually running the deck below — if your install is healthy, you will reproduce all of them.
The circuit
The deck below is the second-order section from the front-page demo: a 35.19 Ω resistor, a 10 mH inductor, and a 3957.9 nF capacitor in series, driven by a 1 V step. Those values put the natural frequency at f₀ = 800 Hz and the damping ratio at ζ = 0.35 — underdamped, so the output rings before it settles.
* series RLC step — f0 = 800 Hz, zeta = 0.35
V1 in 0 PULSE(0 1 0 1u 1u 1 2)
R1 in n1 35.19
L1 n1 out 10m
C1 out 0 3957.9n
.tran 10u 6m
.end
One detail worth noticing: V1 is a PULSE source with
1 µs edges and a 1 s pulse width — on a 6 ms window that is effectively an ideal
step, but the finite edge keeps the breakpoint handling honest.
Run it
Save the deck as rlc_step.cir and hand it to the CLI. The
-f csv flag selects CSV output; -o names the file.
rspice run rlc_step.cir -f csv -o out.csv
✓ Transient complete: 642 time points computed
Results exported to: out.csv
Simulation complete in 0.006s.
The same deck runs unchanged in the desktop app and the browser app — open it and press Run (F5). The CLI is just the headless front door to the identical engine.
Reading the CSV
out.csv has one row per solved timepoint — 642 for this deck, since
the adaptive timestepper concentrates points where the waveform bends — with a time
column followed by one column per saved node voltage: V(IN),
V(N1), V(OUT). Plot V(OUT) against time and
you should see the classic underdamped step response: a fast rise, one pronounced
overshoot, and a decaying ring at roughly the damped frequency.
Note
For day-to-day work the adaptive grid is what you want. The regression suite is stricter: it replays ngspice-46's exact timestep sequence so the two engines can be diffed point-for-point — same grid, same answer, not “looks close”. The parity dashboard shows the results.
What you should see
For a second-order lowpass with ζ = 0.35 the step response is known in closed form, which makes this deck a good first sanity check: every number below follows from the component values, and each one was read off the CSV produced by the exact command above.
Checkpoint values
- Peak — v(out) tops out at 1.309 V at t ≈ 0.67 ms (one half-period of the damped ring).
- Overshoot — ≈ 30.9 %, the closed-form value for ζ = 0.35.
- Settling — the ring stays inside ±2 % of final value from ≈ 2.2 ms onward.
- Final value — 1.0000 V: at DC the inductor is a short and the capacitor charges to the source.
If your numbers differ in the third decimal, look at the time grid first — point counts can shift slightly between releases as the step controller is tuned, and the peak sample lands wherever the grid put it. Everything else in this deck is exact.