POV-Ray : Newsgroups : povray.advanced-users : Simplified fluid dynamics : Re: Simplified fluid dynamics Server Time
29 Jul 2024 04:16:46 EDT (-0400)
  Re: Simplified fluid dynamics  
From: Ben Birdsey
Date: 3 Dec 2002 20:29:45
Message: <3DED5ABB.5000703@mail.com>
Why don't you try this one:

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

v1, v2 = velocities of particle 1 and 2
p1, p2 = locations of particle 1 and 2
dt = the time step

Dist = vlength(p1-p2);
v1 = v1 + Fluidity * (v2-v1) * exp(-Dist/Range) * dt;

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

this will cause all the particles to approach the same velocity 
exponentially within approximately 1/Fluidity time steps.  You could 
then use Range to control the effect of distance or the "skin depth" of 
the fluid.

Implementing viscosity like this might allow you to use a very gentle 
force to keep the particles together, like

v1 = v1 + ( Fluidity1 * (v2-v1) + Fluidity2 * (p2-p1)*(Dist-Size)  )* 
exp(-Dist/Range) * dt

In this case, Size is the average distance the particles will try to 
keep from their nearest neighbor.

Let me know if either of these ideas work.

- Ben


Post a reply to this message

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