How do I set a voltage across a capacitor?
There are three ways to set a voltage across a capacitor. Let's assume there is a 100nF capacitor between the nodes 6 and 7, and we want to set an initial condition of 5V across the capacitor.
The first way is with a .IC statement. In the text area or the schematic area, type in the statement
Capacitor VALUE Attribute
The second way is in the VALUE attribute of a capacitor. Define the capacitor's VALUE attribute as:
This will place 5V across the capacitor. Note that the capacitor does have polarity, so this condition will place 5V across the capacitor in relation to its plus and minus pins. You can view which pin is which by enabling the Display Pin Names checkbox in the Attribute dialog box. If the polarity is reversed, just rotate the capacitor so that the plus pin is on node 6 and the minus pin is on node 7, or you can just set the condition to -5V.
State Variables Editor
When you initially enter transient analysis, go to the Transient menu and choose State Variables Editor. Set the node voltage of nodes 6 and 7 so that there is a 5V difference between them. You can then write these conditions to a file and use the Read option in the State Variables list, or close and use the Leave option in the State Variables list. The State Variables list is available in the Transient Analysis Limits dialog box.
In most cases, the operating point should probably be disabled in the Transient Analysis Limits dialog box to get desired results. If you use the State Variables Editor though, the operating point must be disabled.