Graphics Reference
In-Depth Information
6.3
Extrapolation
Our fluid simulation loop looks like this:
1. If necessary reinitialize the fluid/air signed distance function φ to
signed distance.
2. Extrapolate the divergence-free velocity field from the last time step
outside the fluid, to get an extended velocity field u n .
3. Add body forces such as gravity or targetting to get an interim velocity
field..
4. Advect the interim velocity field and φ in the divergence-free u n veloc-
ity field.
5. Solve for and apply pressure to get a divergence-free velocity u n +1
in
the new fluid region.
We now will address the second step, the extrapolation of velocity from
inside the fluid. In several other chapters we've made passing reference
to extrapolation of other quantities as well, which we will explain here.
We'll only use constant extrapolation, i.e., setting a quantity at a point
outside the fluid to the value at the closest point on the fluid surface. This
was shown to work well for velocity by Enright et al. [Enright et al. 02b]
and is generally all we need for this topic; if interested you might check
out the higher-order generalizations developed by Aslam [Aslam 04]. Also
recall that inside solids, we can get more robust treatment of boundary
conditions by setting the normal component of the extended velocity field
equal to the normal component of the solid (and note that we now have a
sensible definition of normal inside the solid volume from the gradient of
its signed distance function).
The most straightforward approach to extrapolation is to directly use
the closest point definition. In fact, when we constructed signed distance
geometrically, we actually stored at each grid point the index of the closest
element (either point or triangle) alongside the value of φ ,makingextrap-
olation a simple matter of copying from those surface points. Of course,
when extrapolating velocity we're working on staggered grid locations, not
the grid points where we computed closest elements—in that case we can
simply average from the neighboring grid cell centers, or find the closest
of the two elements stored at the neighboring grid cell centers. This still
leaves the question of how to get the values at the surface elements: the
usual tri- or bilinear interpolation will involve outside values that we don't
yet know. The simplest solution is to view tri- or bilinear interpolation
as a particular weighted average of nearby values and simply zero out the
Search WWH ::




Custom Search