## Simple inductor circuit - waveform seems incorrectSOLVED

 https://www.circuitlab.com/editor/#?id=awjzfb When plotting this sample circuit, the voltage is a sinewave that swings around zero as expected. The current, on the other hand, is a sinewave that goes from zero to a positive value; it should also be a sinewave centered on zero. Changing values does not help. Phase relationship is correct. Thank you for any suggestions. by lsears December 10, 2021 You are using a perfect inductor with no resistance so no way to dissipate energy. Put in a bit of series resistance and it works as expected by Foxx December 11, 2021 Thank you for your reply. I appreciate your looking into it. However, I did find the problem, and is, indeed, somewhat related to the resistance of the circuit - although adding resistance did not, at first glance, affect the simulation. I simply didn't let the simulation run long enough. It turns out that the current waveform is a sinewave whose average value starts out positive but which ultimately settles down to be centered at zero, as you would expect. I assume the response is due to the discontinuity at the start of the simulation. Increasing the series R makes the waveform reach equilibrium sooner. Thank you again for looking into this. by lsears December 12, 2021 You've just discovered power system transients, something you have to allow for in power system protection by Foxx December 13, 2021 Thank you for your comment; indeed it does. It also points out the need to be diligent and mindful when using simulations. by lsears December 13, 2021