Circuit simulation in ngspice