Graphics Reference
In-Depth Information
Dividing through by Δ t and rearranging gives a familiar (though still gi-
gantic) form for the linear equation:
V i +1 / 2 ,j,k
ρ i +1 / 2 ,j,k
+ V i− 1 / 2 ,j,k
ρ i− 1 / 2 ,j,k
+ V i,j +1 / 2 ,k
ρ i,j +1 / 2 ,k
+ V i,j− 1 / 2 ,k
ρ i,j− 1 / 2 ,k
+ V i,j,k +1 / 2
ρ i,j,k +1 / 2
p i,j,k
+ V i,j,k− 1 / 2
ρ i,j,k− 1 / 2
Δ t
Δ x 2
V i +1 / 2 ,j,k
ρ i +1 / 2 ,j,k
V i− 1 / 2 ,j,k
ρ i− 1 / 2 ,j,k
V i,j +1 / 2 ,k
ρ i,j +1 / 2 ,k
p i +1 ,j,k
p i− 1 ,j,k
p i,j +1 ,k
V i,j− 1 / 2 ,k
ρ i,j− 1 / 2 ,k
V i,j,k +1 / 2
ρ i,j,k +1 / 2 p i,j,k +1
V i,j,k− 1 / 2
ρ i,j,k− 1 / 2 p i,j,k− 1
p i,j− 1 ,k
V i +1 / 2 ,j,k u i +1 / 2 ,j,k
V i− 1 / 2 ,j,k u i− 1 / 2 ,j,k
1
Δ x
=
+ V i,j +1 / 2 ,k v i,j +1 / 2 ,k
V i,j− 1 / 2 ,k v i,j− 1 / 2 ,k
+ V i,j,k +1 / 2 w i,j,k +1 / 2
V i,j,k− 1 / 2 w i,j,k− 1 / 2
V i,j,k ) u solid
V i,j,k ) u solid
( V i +1 / 2 ,j,k
i +1 / 2 ,j,k
( V i− 1 / 2 ,j,k
i−
1 / 2 ,j,k
1
Δ x
V i,j,k ) v solid
V i,j,k ) v solid
i,j− 1 / 2 ,k
+
+( V i,j +1 / 2 ,k
i,j +1 / 2 ,k
( V i,j− 1 / 2 ,k
.
V i,j,k ) w solid
V i,j,k ) w solid
+( V i,j,k +1 / 2
( V i,j,k− 1 / 2
i,j,k +1 / 2
i,j,k− 1 / 2
Particularly, if you rescale the cell volumes to be dimensionless volume
fractions—i.e., 1 for a full fluid cell, 0 for an empty cell—this can be seen
to be just a weighted, variable density version of the first discrete equations
we derived. Exactly the same matrix structure and PCG algorithm may
be employed to solve the system, and of course the pressure gradient used
to update the velocities is identical.
4.5.4 More on Volume Fractions
It should be clear from this form of the equations that there may be troubles
when volume fractions get too small, particularly considering we are using
PCG to only approximately solve the equations. It can be worthwhile to
detect fractions less than some tolerance, say 0 . 01, and either round them
up to be equal to the tolerance or round them down to exactly zero. (Of
course, if you are using simple 2
2 supersampling to estimate volume
fractions, you will never generate fractions between 0 and 1 / 8.)
×
2
×
Search WWH ::




Custom Search