There are three conditions:
- before the switch is closed (opened)
- while the switch is closed (closed)
- after the switch is closed (opened)
I think I need to solve them sequentially, because the system has memory.
Here are the system equations (before the switch is closed):
\$\Large\frac{9+9}{R_6+R_9}+\frac{9-V_d}{R_4}+\frac{9-V_c}{R_1}=0\$
\$\Large\frac{V_d-9}{R_4}+\frac{V_d-V_c}{R_8}+\frac{V_d}{R_5}+\frac{V_d-V_d⋅{(1-e^{-\frac t{R_7⋅C_2}})}}{R_7}=0\$
\$\Large\frac{V_c-9}{R_1}+\frac{V_c-V_d}{R_8}+\frac{V_c}{R_2}+\frac{V_c-V_c⋅{(1-e^{-\frac t{R_3⋅C_1}})}}{R_3}=0\$
Also, the current flow of \$V2\$ before the switch is closed is meaningless; if I try to cut the wire between \$V2\$ and node \$a\$ to see the graph before and after, it won't alter \$V_c\$ and \$V_d\$. So it is meaningless. That's why I'm not including this current flow in the equation number 1 above.
Edit: Sorry, it did alter, but for a tiny amount
Some strange things happened after plugging in the \$R\$ values. When I use Microsoft Mathematics to solve equations \$2\$ and \$3\$, I get the correct graph, but if I try to solve the equation \$2\$ with \$1\$, or \$3\$ with \$1\$, I get the wrong graph. What's wrong?
PWL
and use a.STEP
command with a resistor instead of the switch, having the values1m
and1g
(note the smaller difference between the orders of magnitude, something which may cause hiccups). This is because the capacitor may need to reach a steady state which will make comparisons more difficult. Plotting a.step
'ed quantity will let you analyse them in parallel. In this case,startup
will not be needed, LTspice would automatically determine the operation point. \$\endgroup\$float
, instead ofdouble
(unless.opt numdgt=8
, or greater), for speed. Using such great differences between values is also discouraged by the manual, not to mention common sense. What values do you think those get to be converted into during the simulation?1m
is << than the kOhms you have, and1g
is >> than the kOhms, you won't feel any difference, and LTspice will happily simulate it, correctly. \$\endgroup\$