Tried Bard ... Sure, here is an example of an LC tank circuit simulated in ngspice: Code snippet
Copy code
* This is a simple LC tank circuit
* The inductor is L=1H and the capacitor is C=1uF
* The circuit is excited by a DC voltage source of V=1V
* Define the circuit elements
.define L 1H
.define C 1uF
* Define the voltage source
V1 1 0 DC 1V
* Create the circuit
L1 1 2 1H
C1 2 0 1uF
* Run the simulation
.tran 1ms 100ms
* Plot the results
.plot v(1)
l
Luis Henrique Rodovalho
05/04/2023, 4:04 PM
I think this circuit won't oscillate. It has a constant voltage source. It should have an initial condition.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.