I’m sure I’m missing something obvious, but when I do an operating point or transient analysis of the simple circuit below, the result suggests that the capacitor is charged to 0V and the resistor R2 thus has a 40V voltage differential over it, without any current flowing through it. Also, the 40pA flowing through the R1 resistor and out of the V1 DC source but not through the capacitor, seems suspect.
This is a simplified project, but this behaviour comes back to bite me in several different occasions, for example in an audio amplifier with bootstrapping.
Also, if you delete the capacitor and just leave the end of R2 floating, the voltage for that node will not be shown.
Any help and explanation / discussion which would clear this up or perhaps even improve the behaviour of the software is greatly appreciated!
You have set R2 to ‘exclude from simulation’. Thus it is removed. ngspice has to cope with an open circuit.
ngspice reports a warning on a singular matrix, unfortunately on an internal node generated by the .probe command. Singular matrix mostly means ‘open circuit’. Normally ngspice cannot find a solution for this configuration. As a remedy there is an op method called optran, where it adds a resistor of value 1/gmin to the open ends, with gmin defaulting to 1e-12.
It was of course a stupid mistake to not see that R2 was set to excluded from simulation…
It spontaneously makes me wish for a feature where it shows visibly in the schematic, which symbols are excluded from simulation.
But it also indicates, that I have not been able to isolate what the actual problem in my “real” project is…
By the way, this is what the OP simulation looks like when R2 is not excluded:
The presentation of the transient analysis result is slightly odd, where it zooms in on a 14fV difference in voltage between the capacitor negative side and the voltage source or the node between the resistors. Is that difference due to the “optran” kicking in automatically, or is there some other reason for the 14fV?