Hello QSpice forum! I am a beginner in Spice circuit simulation.
The documentation for the capacitor shows the default value for IC as 0.
I tried to simulate a simple RC circuit and got these curves.
It looks like the actual default IC value for a capacitor is 1. Is this a bug or a typo in the documentation?
In SPICE (not only Qspice), transient simulation (.tran) starts (i.e. at t=0s) with certain initial condition. In default, initial voltage/current conditions are calculated from bias point / DC operating point simulation (.op) [Operation point values not corresponding to plots (using PWL controlled DC supplies)]. In short, SPICE performed a .op simulation before .tran begin, as to take the initial condition value for .tran to be used.
For your circuit, DC operating point is to assume C1 fully charged over time, where V(X)=V1.
I think Qspice Help should describe IC as “not set” to prevent confusion for SPICE beginner.
I am almost sure “IC” stands for “Initial Condition”. For a capacitor the IC is a certain user-specified voltage across it. There is the IC for an inductor as well. It is a certain user-specified current through it.
I wonder if there are other basic devices that have the IC defined and what its meaning is in those cases
Thank you jπ for the suggestion. I know see the flaw in my thinking. I’ve got to wrap my head around how to think about the initial conditions in terms of simulations.
Oops, I meant to say initial condition. Initial current doesn’t make any sense for a capacitor. I just tried, but apparently you can’t edit posts in this forum to fix errors like that.
Interestingly, for the inductor the default value of IC is “none” (matching your suggestion) while for the capacitor it is “0.0”.
Also, I found this reply from Mike Engelhardt from July 2023 talking about the use of the UIC option of the .tran command
If the UIC option is used, what ICs will be used for the components without explicitly defined ICs? Will the defaults be used - “none” for inductors and “0.0” for capacitors?
Refer to this link : UIC
Node voltage and current are considered zero at t=0 if not specified with instance parameter IC or .ic directive when UIC is utilized. Qspice will not store the t=0 data point if UIC is set.