Graphics Reference
In-Depth Information
we have
u
·
n = u solid ·
n,
( τ n )
×
n =0 ,
where the second boundary equation is indicating that the viscous stress
causes no tangential traction.
8.5
Implementation
The first simplification we will make is to use time-splitting again, han-
dling viscosity in a separate step from advection, body forces, and pressure
projection. While there has been a lot of study of methods that simultane-
ously treat viscosity and pressure to great advantage, solving the so-called
Stokes problem , so far in graphics, practitioners have avoided the increased
complexity. With splitting, we will include a step that solves, for one time
step Δ t ,
ρ ∇· η (
u T )
∂u
∂t
1
=
u +
with any or all of the boundary conditions given above.
Since we are not simultaneously handling viscosity and pressure pro-
jection, the question immediately arises: on what intermediate velocity
field do we run viscosity? Does it come before or after advection? In all
cases errors will be made. For the common case of constant viscosity, how-
ever, the attraction of viscosity reducing to a separate Laplacian applied to
each component of velocity (instead of coupling all components of velocity
together) is obvious—and we have seen that this only is justified if the
velocity field is divergence-free. Therefore it is recommended to run viscos-
ity immediately after pressure projection, before body forces and gravity.
However, advection must use a divergence-free velocity field. Therefore we
have two options: apply an additional pressure projection after the viscous
stage to get a new divergence-free velocity field; or run advection with the
pre-viscous divergence-free velocity field but referring to the post-viscous
values. (This is exactly the problem that handling viscosity and pressure
projection simultaneously solves, but again we're going to keep with time-
splitting.) The second option, cheaper but sometimes of obviously lower
quality, can be set up as
Find u V as the result of viscosity applied to divergence-free velocity
field u n , using the viscous boundary conditions.
Advect u V
in the divergence-free velocity field u n to get u A .
Search WWH ::




Custom Search