|
|
<"Greg M. Johnson" <gregj;-)565### [at] aolcom>> wrote:
> Could someone pseudo-code it out for me.
AFAIK there is no simple "energy conservation algorithm".
You and some others around here seem to have the misconception
that the energy of each particle is conserved.
However this is only the case if you only have one central
force (the sun for example), but no additional forces between
your particles (but in this case you would need no numerical
integration at all).
If you have 3 or more particles interacting with forces, only the
sum of the energy of all particles is conserved. So there is no easy
way to use it directly.
Using a better integration algorithm, like runge-kutta, should solve
your problem.
Lutz-Peter
Post a reply to this message
|
|