Graphics Reference
In-Depth Information
p = A 1 b are linear combinations of the entries of d , and the new velocities
u n +1 are linear combinations of u and p .
Physically, it's very obvious that this transformation has to be a pro-
jection. The resulting velocity field, u n +1 , has discrete divergence equal
to zero. So if we repeated the pressure step with this as input, we'd first
evaluate b = 0, which would give constant pressures and no change to the
velocity.
4.5 More Accurate Curved Boundaries
Reducing the geometry of the problem to just labeling grid cells as solid,
fluid, or air can introduce major artifacts when the boundaries are ac-
tually at an angle or curved. For example, a solid slope becomes (in
the eyes of the simulator) a sequence of flat stair steps: obviously wa-
ter flows down stairs very differentlythandownaninclinedslope. Ifyou
render an inclined slope but your water pools at regular intervals along it
instead of flowing down, it looks terrible. As a general rule of thumb,
you can only expect physically plausible motion for things the simula-
tor can “see” (i.e., those that are taken into account in the numerical
discretization of the physics), not details to which only the renderer has
access.
To close out this chapter, we will focus on the issue of accurately ac-
counting for solid boundaries that don't line up with the grid, as it also
reveals an alternative and very useful view of the pressure projection step.
Later, in Chapter 6 on water, we will also look at a more accurate treatment
of the free surface.
The tricky part of handling solids that don't line up with the MAC grid
is that the normal component of velocity is no longer conveniently stored
on the grid: attempts to interpolate that component from the staggered
u -, v -, and w -values and then constrain the interpolant to match the solid
velocity have met with limited success.
One interesting approach is to replace the grid with an unstructured
tetrahedral mesh, with a boundary that matches up with the solid sur-
faces: see for example Feldman et al. [Feldman et al. 05]. However, this
carries with it the overhead of constructing and working with an unstruc-
tured mesh and requires that the mesh scale down to the smallest features
you want to see present in the simulation. As we'll see soon, we can get
around these problems with just a regular Cartesian grid if we rethink our
discretization.
Search WWH ::




Custom Search