Graphics Reference
In-Depth Information
4.6 Particle Update
We update the position and velocity of particles following the Particle-In-Cell
(PIC) and Fluid-In-Particle (FLIP) approaches that mix particles and grids [Zhu
and Bridson 05]. The main idea with these numerical schemes is that instead of
sampling the grid to assign new values (e.g., velocities) to the particles, we can
recover only the differences to their original values.
4.6.1 Particle Velocity
In PIC, the particle's velocity is taken directly from the grid, which tends to
be very dissipative, viscous and leads to damped flow. For more lively features
and better energy conservation, FLIP assigns only the difference in velocities;
the difference between the splatted velocity and the updated splatted velocity
discussed in Section 4.5.
By combining both PIC and FLIP, the liquid can be made very viscous like
melting wax, or it can be made very energetic like water. A parameter r lets the
user control the amount of each:
u p = r u n +1 ( x p )+(1
Δ u ) , with Δ u = u n ( x p )
u n +1 ( x p ) ,
r )( u p
where u n and u n +1 are grid velocities before and after the velocity update in
Section 4.5, and x p , u p are the particle's position and velocity. Using a bit of PIC
( r =0 . 05) is useful in stabilizing the simulation performed with explicit Euler
integration, which can become unstable if the time step is too large.
4.6.2 Particle Position
While we update the particle velocity, we also update the particle positions. We
integrate the particle position using two intermediate steps of Runge-Kutta 2
(RK2), each time sampling the velocity on the grid. The second-order scheme
is only approximate in our case because the velocity field on the grid is kept
constant during integration. At each intermediate step, we keep the particles
from leaving the domain by clamping their positions near the box boundaries:
t u n +1 ( x n + 2
) , with x n + 2
x n +1
p
=0 . t u n +1 ( x p ) .
p
p
Note that we never modify the density value of the particles.
4.7 Rigid Obstacles
We can prevent the particles from penetrating rigid obstacles in the domain by
adding an artificial pressure constraint where the objects are. This follows the
same logic as with the particle density. We define a smooth distance field to
Search WWH ::




Custom Search