In [1]:
from lcapy import Circuit, s
cct = Circuit("""
V1 1 0 10; down
C1 1 2 1e-6 0; right, size=2
R1 2 3 2; down, size=1.5
L1 3 0_1 8e-3 5; down, v=v_L, i=i
W 0 0_1; right
""")
cct.draw()



In [2]:
scct = cct.s_model()
scct.draw()



In [3]:
cct.L1.V(s).partfrac()


Out[3]:
$$- \frac{20000 \sqrt{7999} \mathrm{j}}{7999 \left(s + 125 + 125 \sqrt{7999} \mathrm{j}\right)} + \frac{20000 \sqrt{7999} \mathrm{j}}{7999 \left(s + 125 - 125 \sqrt{7999} \mathrm{j}\right)}$$

In [4]:
cct.L1.v


Out[4]:
$$\begin{cases} - \frac{40000 \sqrt{7999} e^{- 125 t} \sin{\left(125 \sqrt{7999} t \right)}}{7999} & \text{for}\: t \geq 0 \end{cases}$$

In [5]:
cct.L1.I(s).poles()


Out[5]:
$$\left\{ -125 - 125 \sqrt{7999} \mathrm{j} : 1, \ -125 + 125 \sqrt{7999} \mathrm{j} : 1\right\}$$

In [6]:
%matplotlib inline
from numpy import linspace
t = linspace(0, 10e-3, 400)
ax = cct.L1.v.plot(t)


Note, in practice, there is a 100:1 step up to a secondary coil connected to a spark-gap. Once the spark forms, the secondary coil is shorted out and energy is removed from the circuit damping the oscillation.