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]:
In [4]:
cct.L1.v
Out[4]:
In [5]:
cct.L1.I(s).poles()
Out[5]:
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.