Graphics Reference
In-Depth Information
from a given sampling density. Ideally you should choose your grid size so
that the water features you want to resolve are at least
x thick.
6.2.4 Boundary Conditions
So far we have avoided discussion of solids, just referring to the water-air
surface. This is, unfortunately, probably the messiest part of the operation
and has yet to be fully resolved in research. However, something must
be decided—once water is in contact with a solid, we need to decide a
boundary condition for φ at the solid: what values should φ take in grid
cell centers that lie inside a solid?
One approach is to either join the solid with the air or, less commonly,
the water. Taking the former as an example, this means taking φ to be
zero at both the air-water surface and the solid-water surface, negative
only inside the water and positive in both solid and air. This is pleasantly
unambiguous, but does give rise to some annoying artifacts. For example
in rendering, due to truncation error on the grid, there might be small gaps
between the solid and the water that show up as spurious grid-aligned air
pockets. One partial remedy is to offset the simulated solid geometry a
little inwards from the rendered solid geometry, say by a fraction of a grid
cell, to cover potential gaps. However, more troubling is the diculties this
makes when later in this chapter we improve the accuracy of the pressure
solve for free surfaces: we'll need to be able to distinguish the solid-water
boundary as not a free surface.
A possibly superior approach is to extrapolate φ from the water-air re-
gion into the solid, virtually extending the surface. If done carefully enough
this can even enable impressive simulations of surface tension interactions
—see Wang et al. [Wang et al. 05]—but is fraught with diculties. For
example, when a water drop is pulled off a solid surface, semi-Lagrangian
advection may keep tracking back to negative φ values in the wall, mak-
ing it impossible for water to leave a solid. 5 In any case, at its simplest
this can be implemented by extrapolating φ from the water-air region into
the solid, as discussed in the next section, and then reinitializaing signed
distance throughout the whole grid.
5 In fact, this gets at a deeper conundrum, that the solid-wall condition u· n = u solid · n
doesn't actually allow for liquids to separate from solids. To “correct” this Foster and
Fedkiw [Foster and Fedkiw 01] proposed a simple unsticking trick that only enforces
n , which unfortunately fails in several common scenarios; Batty et al. [Batty
et al. 07] later demonstrated a more robust, physically consistent, though expensive
treatment. This too is an area where the continuum description doesn't quite model
reality with its discrete molecules that can separate from a solid surface.
n ≥ u solid ·
Search WWH ::




Custom Search