Graphics Reference
In-Depth Information
4.5.1 The Finite Volume Method
One solution is to be found in the finite volume method, mentioned earlier.
Here we discretize the integral form of the incompressibility condition:
u
·
n =0 ,
∂C
where ∂C is the boundary of a control volume C . In particular, in the inte-
rior of the flow, we take each grid cell as a control volume and approximate
the boundary integral over each face of the cell as the area Δ x 2 of the face
times the normal component of velocity stored at the face center. At the
boundary, it gets more interesting: if a solid wall cuts through a grid cell,
we take just the fluid part of the cell as the control volume. This means
that the area of some of the faces will be reduced to just the fraction of
each face that lies in the fluid. In addition, a term corresponding to the
part of the solid wall boundary that cuts through the cell can be added.
The equation for such a cut cell is then
A i− 1 / 2 ,j,k u i− 1 / 2 ,j,k + A i +1 / 2 ,j,k u i +1 / 2 ,j,k
A i,j− 1 / 2 ,k v i,j− 1 / 2 ,k + A i,j +1 / 2 ,k v i,j +1 / 2 ,k
(4.14)
A i,j,k− 1 / 2 w i,j,k− 1 / 2 + A i,j,k +1 / 2 w i,j,k +1 / 2
+ A solid ( u solid ·
n )=0 ,
where the A terms are the (possibly fractional) face areas. Plugging in
the same pressure gradient as before results in a symmetric positive semi-
definite linear system of the same structure as before (and solvable with
exactly the same code) but with modified non-zero entries near boundaries.
It's worth pointing out that in this discretization, unlike the voxelized
version from earlier on, pressures inside the solid walls—precisely those that
are involved in velocity updates near the wall—appear as actual unknowns
in the equations and cannot be simply eliminated as ghost values as before.
Indeed, it's these extra unknowns that ultimately allow a more accurate
solution.
However, this use of pressures inside the walls also means that this
approach can't perfectly handle thin solids, solids that are thinner than
a grid cell—including most models of cloth, for example. Ideally there
should be no direct coupling of pressures or velocities on either side of a
fixed, thin solid. In these cases the voxelized pressure-solve approach, which
only uses ghost pressures across solid wall faces, may be preferable—refer
to Guendelman et al. [Guendelman et al. 05] for a full description of using
voxelized thin solids in fluid simulations.
Search WWH ::




Custom Search