Graphics Reference
In-Depth Information
This is a fine approximation for small density variations. However, for
more extreme scenarios that are common in graphics, extra fidelity can
be obtained by not taking the Boussinesq approximation, i.e., by treating
the density as a variable in the pressure solve. Whereas the buoyancy
model only generates forces in the vertical direction, the full model can
give interesting plumes along any strong pressure gradient, such as radially
inwards in rotating regions of the flow.
As a first step before the variable-density solve, Equation (5.3) should
be used to determine the fluid density at each velocity sample in the MAC
grid. This entails averaging the temperatures and smoke concentrations
from the grid cell centers to the grid cell faces, in the usual manner. These
u -, v -and w -densities modify the pressure projection in two ways. The
pressure update is now
i +1 / 2 ,j,k = u i +1 / 2 ,j,k t p i +1 ,j,k
p i,j,k
ρ i +1 / 2 ,j,k Δ x
u n +1
,
i,j +1 / 2 ,k = v i,j +1 / 2 ,k t p i,j +1 ,k
p i,j,k
ρ i,j +1 / 2 ,k Δ x
v n +1
,
i,j,k +1 / 2 = w i,j,k +1 / 2 t p i,j,k +1
p i,j,k
ρ i,j,k +1 / 2 Δ x
w n +1
,
and the coecients of the matrix A similarly incorporate the densities, as
illustrated at the end of Chapter 4.
One possible problem that arises when using the variable-density solve
is that the matrix may be ill-conditioned when large density variations are
present. This means PCG will run for more iterations to return an accurate
answer. For reasons of practicality it may therefore be worthwhile to clamp
density to a lower bound of, say, 0 . 05 times the background density ρ 0 .
5.4 Divergence Control
If you read the last section critically, you might have noticed we violated
conservation of mass. The incompressibility constraint implies that fluid
volumes remain constant, but if simultaneously the density is changed, it
must mean mass is also changed. Perhaps unsurprisingly, however, most
audiences aren't troubled by the violation: fluid motion is adequately com-
plex and hard to predict so that this “problem” isn't usually an issue.
That said, the solution to the problem can be generalized to one of the
most useful simulation controls in smoke: divergence control .
Search WWH ::




Custom Search