Game Development Reference
In-Depth Information
to large inaccuracies when the derivative is high. Furthermore, to obtain [ j /dt ] 0
for all neighbors j of a particle i , [ j /dt ] 0 has to be calculated before the up-
date loop at t 0 because it involves a sum over the neighbors of every particle j .
However, during the update loop of t 1 , the velocities [ v j ] 0 have not yet been
established for all particles, so [ j /dt ] 0 cannot be accurately calculated and has
to be estimated itself.
6.6 Stability and Behavior
Within an SPH fluid simulation, many parameters influence the behavior of fluid
particles. The behavioral influence can be so large that, in certain cases, adding
gravity to a system of particles is enough to keep the particles from moving into
a rest state. In other words, the stability of the SPH simulation is easily com-
promised, even in basic situations. This section will identify the parameters that
influence the behavior of an SPH particle system and evaluate the stability and
behavior of a particle system under the influence of gravity for different values of
selected parameters. The evaluation will be performed for both the original SPH
algorithm as discussed in Section 6.3 and the collapsed SPH algorithm optimized
for performance from Section 6.5.
First, we will focus on stability under extreme circumstances; for both algo-
rithms, we will try to find parameters for which the SPH simulation becomes too
unstable to remain usable. The resulting range of usable parameters will estab-
lish whether one algorithm is restricted in the possible selection of parameters
compared to the other algorithm. Afterwards, we will evaluate the visual output
of both the original and the collapsed SPH simulation. We can thereby verify
differences in behavior between both types of algorithms.
To find the range of usable parameters for an SPH fluid simulation, we have
to find the parameters that influence the behavior of the simulation. Therefore, we
look at the forces acting on a particle, as defined by Equation (6.4). Three forces
act on a fluid particle: f i
, f i
,and f ext
. In our test scenario, the only external
forces are gravity and collision forces produced by static geometry. We will only
consider gravity and leave collision forces out of the discussion, as these are very
specific to the type of collision response desired. Also, we do not consider viscous
forces. Viscous forces dampen the velocity of particles, reducing the effects of
instability. As we had to constrain the number of parameters influencing the fluid
behavior, we chose to evaluate cases where instability is most prevalent, namely,
the ones with zero viscosity. 1
1 We performed tests to verify that adding viscosity does not affect the collapsed SPH algorithm in
ways different from the original algorithm. Both algorithms turned out to be more stable with added
viscosity—a larger range of parameters could be chosen—but neither one turned out to be more stable
than the other. We therefore chose to omit the results of tests with nonzero viscosity.
Search Nedrilad ::

Custom Search