Graphics Reference
In-Depth Information
Andnowin3Dforfluidgridcell( i, j, k ):
u n +1
u n +1
i− 1 / 2 ,j,k
v n +1
v n +1
i,j− 1 / 2 ,k
w n +1
w n +1
i,j,k− 1 / 2
i +1 / 2 ,j,k
i,j +1 / 2 ,k
i,j,k +1 / 2
+
+
=0 ,
(4.10)
Δ x
Δ x
Δ x
u i +1 / 2 ,j,k
1
Δ x
Δ t 1
ρ
p i +1 ,j,k
p i,j,k
Δ x
u i− 1 / 2 ,j,k
Δ t 1
ρ
p i,j,k
p i− 1 ,j,k
Δ x
+ v i,j +1 / 2 ,k
Δ t 1
ρ
p i,j +1 ,k
p i,j,k
Δ x
v i,j− 1 / 2 ,k
Δ t 1
ρ
p i,j,k
p i,j− 1 ,k
Δ x
+ w i,j,k +1 / 2
p i,j,k +1
p i,j,k
Δ t 1
ρ
Δ x
w i,j,k− 1 / 2
=0 ,
Δ t 1
ρ
p i,j,k
p i,j,k− 1
Δ x
6 p i,j,k
p i +1 ,j,k
p i,j +1 ,k
p i,j,k +1
p i− 1 ,j,k
p i,j− 1 ,k
p i,j,k− 1
Δ t
ρ
=
Δ x 2
u i +1 / 2 ,j,k
u i− 1 / 2 ,j,k
Δ x
+ v i,j +1 / 2 ,k
v i,j− 1 / 2 ,k
Δ x
+ w i,j,k +1 / 2
.
(4.11)
w i,j,k− 1 / 2
Δ x
Observe that Equations (4.9) and (4.11) are numerical approximations to
the Poisson problem
u .
If a fluid grid cell is at the boundary, recall that the new velocities on
the boundary faces involve pressures outside the fluid that we have to define
through boundary conditions: we need to use that here. For example, if
grid cell ( i, j + 1) is an air cell, then we replace p i,j +1 in Equation (4 . 9)
with zero. If grid cell ( i +1 ,j ) is a solid cell, then we replace p i +1 ,j with the
value we compute from the boundary condition there, as in formula (4.6).
Δ t/ρ
∇·∇
p =
−∇ ·
Search WWH ::




Custom Search