Graphics Reference
In-Depth Information
that ultimately cannot be represented on the grid are removed from the
particles.
This error-correction process begins with identifying escaped particles :
particles where φ interpolated from the grid is a different sign from their
own φ p and of larger magnitude. These are cases where an air particles
ended up inside the water, or a water particle ended up inside the air,
and have gone further than their own radius. We expect that for all other
particles, the grid representation is probably smoother and more accurate,
and thus should have precedence. The escaped particles are then used to
build a corrected level set. The positive escaped particles are considered as
one set E + , defining φ + on the grid as the max of the regular grid φ and
the distance to the union of the escaped positive particles:
φ i,j,k =max( φ i,j,k , min
p∈E +
x i,j,k
x p
φ p ) .
This can be eciently computed for the grid cells near escaped positive
particles by looping over the particles, adjusting the values on the grid
nearby each. Similarly the negative escaped particles E build a corrected
version φ :
φ i,j,k =min( φ i,j,k ,
p∈E
min
x i,j,k
x p −|
φ p |
) .
Finally, the two corrected versions φ + and φ are reconciled by taking
φ corrected to be whichever of the two has least magnitude at each grid point,
as that presumably is the one with information most relevant to the true
interface.
At this point the corrected φ is reinitialized to signed distance, as it may
be quite far from a true distance function now. This may of course perturb
the surface again, smoothing out features, and so the particles are used
to correct this version again. It is this corrected-reinitialized-recorrected
grid representation that we now take as the final level set: it should be
numerically close to signed distance and should contain all features that
can still be represented on the grid after advection. It's now the turn
of the particles to be corrected: particles that still register as escaped
are deleted (more on this in a moment) and the rest take their new radii
from interpolating φ from the grid and clamping to the allowed range of
magnitudes [0 . x, 0 . x ].
Finally, since the velocity field might have stretched apart the initial
dense sampling near the interface, or sucked in some particles deep into
the fluid where they are now essentially useless, a periodic reseeding step is
required: in grid cells further than 3Δ x from the interface, all particles are
Search WWH ::




Custom Search