Graphics Reference
In-Depth Information
separately. Let's write out the material derivative for the color vector
C =( R, G, B ):
= ∂ C
∂t
DR/Dt
DG/Dt
DB/Dt
∂R/∂t + u
·∇
R
D C
Dt
=
C.
=
∂G/∂t + u
·∇
G
+ u
·∇
∂B/∂t + u
·∇
B
C might not strictly make sense (is the
gradient of a vector a matrix? what is the dot-product of a vector with a
matrix? 1 ) it's not hard to figure out if we split up the vector into scalar
components.
Let's do the same thing for velocity itself, which really is no different
except u appears in two places, as the velocity field in which the fluid is
moving and as the fluid quantity that is getting advected. People some-
times call this self-advection to highlight that velocity is appearing in two
different roles, but the formulas work exactly the same as for color. So
just by copying and pasting, here is the advection of velocity u =( u, v, w )
spelled out:
So although the notation u
·∇
Du/Dt
Dv/Dt
Dw/Dt
∂u/∂t + u ·∇u
∂v/∂t + u
Du
Dt
∂u
∂t + u ·∇u,
=
=
=
·∇
v
∂w/∂t + u
·∇
w
or if you want to get right down to the nuts and bolts of partial derivatives,
∂u
∂t + u ∂u
∂x + v ∂u
∂y + w ∂u
∂z
Du
Dt
∂v
∂t + u ∂v
∂x + v ∂v
∂y + w ∂v
=
.
∂z
∂w
∂t
+ u ∂w
∂x + v ∂w
+ w ∂w
∂z
∂y
If you want to go even further, advecting matrix quantities around, it's
no different: just treat each component separately.
1.4
Incompressibility
Real fluids, even liquids like water, change their volume. In fact, that's just
what sound waves are: perturbations in the volume, and thus density and
pressure, of the fluid. You may once have been taught that the difference
between liquids and gases is that gases change their volume but liquids
1 With slightly more sophisticated tensor notation, this can be put on a firm footing,
but traditionally people stick with the dot-product.
Search WWH ::




Custom Search