|
 |
scott wrote:
>> OK, so I did all of that, and I *still* have the problem of the forces
>> in RK4 appearing to be a different scale from the forces using the
>> Newtonian method.
>>
>> Shouldn't I be able to just swap out the two, choosing Newtonian for
>> speed, or RK4 for accuracy, and see relatively equal* results?
>
> Yes, if your time-step is small enough for Newton to work roughly
> correctly. Do you still get the same difference if you reduce the time
> step by a factor of 100? If you do, then it's a coding error, if you
> don't then it's simply the fact the Newton is not doing very well at
> your previous time step amount.
>
> Did you try a simple system first, eg constant force or very soft spring
> from one point? With a constant force you should be able to calculate
> the exact velocity and position by hand and compare with what your
> algorithm gives out.
OK, I "fixed" the timestep at 1/200th of a second, and removed all
particle collisions - now the only force is that of gravity.
Using the two integrators, the particles follow roughly the same path,
but using RK4 they appear to have an increased velocity - they follow
the same path much more quickly.
Which means I've got an error somewhere in my code...
--
...Ben Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |