Graphics Reference
In-Depth Information
“ripples” less than a grid cell high do not show up at all in the pressure
solve, and thus they aren't evolved correctly but rather persist statically in
the form of a strange displacement texture. Somehow we need to inform
the pressure solve about the location of the water-air interface within each
grid cell. More precisely, we are going to modify how we compute the
gradient of pressure near the water-air interface for updating velocities,
which naturally will also change the matrix in the pressure equations. 6
Our first solution is to use the ghost fluid method, as laid out by Gibou
et al. [Gibou et al. 02]. We'll illustrate this by looking at the update to
u i +1 / 2 ,j,k , which in the interior of the water would be
Δ t
ρ i +1 / 2 ,j,k
p i +1 ,j,k
p i,j,k
u n +1
i +1 / 2 ,j,k = u i +1 / 2 ,j,k
.
Δ x
Suppose further that ( i, j, k ) is in the water, i.e., φ i,j,k
0, and that
( i +1 ,j,k ) is in the air, i.e., φ i +1 ,j,k > 0 (treating the case where it's
the other way around will be obvious). The simple solver before then set
p i +1 ,j,k = 0. However, it would be more accurate to say that p =0atthe
water-air interface, which is somewhere between ( i, j, k )and( i +1 ,j,k ).
Linearly interpolating between φ i,j,k
and φ i +1 ,j,k
gives the location of the
interface at ( i + θ Δ x, j, k )where
φ i,j,k
φ i,j,k
θ =
.
φ i +1 ,j,k
Linearly interpolating between the real pressure p i,j,k and a fictional “ghost”
pressure p i +1 ,j,k , then setting it equal to zero at the interface, gives
(1 − θ ) p i,j,k + θp i +1 ,j,k =0
1
θ
p i +1 ,j,k =
p i,j,k
θ
= φ i +1 ,j,k
φ i,j,k
p i,j,k .
Now plug this into the velocity update:
φ i +1 ,j,k
φ i,j,k
p i,j,k
p i,j,k
Δ t
ρ
u n +1
i +1 / 2 ,j,k = u i +1 / 2 ,j,k
Δ x
Δ t
ρ
φ i +1 ,j,k
φ i,j,k
p i,j,k
Δ x
= u i +1 / 2 ,j,k
.
φ i,j,k
6 Note that this is quite orthogonal to our accurate approach to solid wall boundaries,
where we use volume fractions to get better estimates of kinetic energy, independent of
how the pressure updates velocity.
Search WWH ::




Custom Search