Graphics Reference
In-Depth Information
The solid velocity terms in the right-hand-side are particularly inter-
esting. Until now we haven't got into the details of how scripted solids
can be brought into the simulation. Here it is apparent they can be added
in almost a compositing-like fashion, with the volume fractions playing the
role of the alpha channel in image compositing. Each solid can estimate the
fraction of the cells it leaves open for fluid or other solids, along with the
associated velocity values (akin to the RGB channels in image composit-
ing); these are blended together in the natural way, e.g. multiplying the
fractions and averaging the velocities according to one minus each fraction,
thus allowing several solids to contribute to an average velocity in one grid
cell.
Taking this compositing idea even further, there are artistic uses for
applying filters such as Gaussian blur on the solid volume fractions (thus
“feathering” the hard edges of the solid to soften its impact) or rescaling
the fractions to make the solid slightly “transparent” to the fluid. The
complement (1
V ) of a blurred/transparent solid gives a soft “mask” in
which fluid is gently constrained to stay, which can be particularly useful
for controlling fluids in an animation.
4.5.5 Velocity Extrapolation
To finish off the section, here is a reminder that only the velocity samples
with non-zero fluid fractions will be updated. The other velocities are
untouched by the pressure and thus may be completely unreliable. As
mentioned in Chapter 3, advection may rely on interpolating velocity from
these untouched values: clearly we need to do something about them. Also,
as mentioned earlier, for inviscid flow it's wrong to simply use the solid
velocity there: only the normal component of solid velocity has any bearing
on the fluid. Therefore it is usual to extrapolate velocity values from the
well-defined fluid samples to the rest of the grid; more on this when we
cover level sets in Chapter 6.
4.6 The Compatibility Condition
Naturally a fluid in a solid container cannot simultaneously be incompress-
ible and satisfy solid velocity conditions that are acting to change the vol-
ume, a simple result of the divergence theorem:
Ω ∇·
u =
Ω
u
·
n.
Search WWH ::




Custom Search