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] Help w/ Euler Cromer algo.



On 09/20/2014 09:47 PM, Bernard Cleyet wrote:

> Cromer claim the Last Point approximation is stable.

I don't want to discuss terminology, such as the definition
of Euler/Cromer or the definition of Last Point approximation.

The idea that matters for the physics (and the math) is
whether the algorithm is symplectic, i.e. whether it
preserves phase space.

I didn't check super-closely, but the Mark-I eyeball says
the example code is symplectic.  So far so good.

The claim is that for an oscillatory system, the simulation
will be stable in the sense that it is confined to a bounded
region in phase space.  As a slightly non-obvious corollary,
the simulated energy will be conserved plus-or-minus a little
bit.  As a further corollary, at the end of each /simulated/
cycle, key variables such as energy must return to their
original values (within something on the order of double-
precision roundoff error, which is very small).

What is not claimed, and what is not generally true, is that
the length of the simulated period will match the true period.

> fitting the result to a cos

That's asking too much.  The simulated period will be off
by a little bit, so the result will deviate from the exact 
cosine by an amount that grows over time.

You could fudge the frequency of the cosine to alleviate
this problem.  Depending on the reason for doing the
simulation, you might or might not care about the frequency
discrepancy.