Skip to main content
2 of 2
deleted 4 characters in body
Anton Menshov
  • 8.7k
  • 7
  • 41
  • 94

It might be worth a try, to write the max amplitudes of the oscillation to file while you run it. If it is almost decayed, you may stop the simulation.

Use the exported file to fit a function:

$$f(t) = a + b e^{-td}$$

If you have enough datapoints and relatively clean peaks, your amplitude from the fit should be quite good. You may even get good error bars from your fitting function of choice. You cannot simulate till eternity anyway.

MPIchael
  • 3.1k
  • 11
  • 19