Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] LC circuit simulation



On 08/05/2014 08:04 PM, Diego Saravia wrote:

I am using an old numerical simulation program called SCEPTRE to
simulate a serial LC circuit plus a DC battery. (without R)

In a long run the current goes to 0 and half the energy is loss. That
kind of simulations do not "conserve energy".

Do anyone here knows how to use other programs as SPICE? How SPICE or
other programs handle this case?

The last time I used spice, back when the pyramids
were young, it was not particularly well optimized
for this.

Those programs are aimed at simulation of large,
complex /networks/. Using such a thing for a single
LC circuit is like using a sledgehammer to swat a
mosquito.

If all you care about is a simple harmonic oscillator,
one excellent way to guarantee good long-term behavior
is to use a /symplectic/ integrator. The simplest
versions of this are exceedingly simple, and can be
expressed in a spreadsheet in less time than it takes
to tell about it.

Fancy symplectic integrators are very fancy indeed,
and very very accurate, but this is probably more
than you need at the moment.

For the next level of detail on all this, see
http://www.av8n.com/physics/symplectic-integrator.htm