Equations of fluid dynamics

Appendix D Color fields

There are two possibilities to implement a color field c in a fluid code. One can treat color like the density, i.e. the color variable obeys a conservation law like the density

tc+rj(vjc) =0. (D.1)

In this case c will exactly behave like density if density and color have the same initial value.

On the other hand one can treat it like a specific quantity obeying a conservation law like

tρc+rj(vjρc) =0. (D.2)

In this case we see, that if c is spatially constant at a time t0, i.e. c(t0)=c0, c(t0)rj=0, it will stay constant forever

tρc+rj(vjρc) =0 (D.3)
ct+vjcrj =0 (D.4)
ddtc =0 (D.5)
c =const.=c0 (D.6)