POV-Ray : Newsgroups : povray.off-topic : Liquid Physics : Re: Liquid Physics Server Time
3 Nov 2024 01:07:45 EDT (-0400)
  Re: Liquid Physics  
From: scott
Date: 1 Apr 2008 01:57:49
Message: <47f1dced$1@news.povray.org>
> Here's a question: The derivative is based on the forces applied to the 
> current particle.  The only way these forces change is when a particle 
> collides with other particles (or ceases to collide).
>
> So, for each of the above, am I to run a full collision detection?

Yes, inside the "acceleration" function, which is called from each 
"evaluate" you put your code for calculating the acceleration.  This, in 
your case, would presumably call the routine to check for collisions and 
work out the forces for all the particles.

Note that you need to put all the positions and velocities for every 
particle inside some state block and evaluate them in parallel using this 
algorithm - you can't do one at a time it doesn't work like that.

You may say that this is 4x as much work per integration step, but it will 
allow your time-step to be far more than 4x bigger and still be completely 
stable.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.