Title: Simulating Fluids in Computer Graphics
1Simulating Fluids in Computer Graphics
- Vorticity and Particle Methods
2Last Lecture
- Smoke simulation
- Smoke concentration (previously called smoke
densities but this is less confusing) - Temperatures
- Sources
- Buoyancy
- Variable densities
- Simulator overview QA
3This Lecture
- Ways to combat numerical diffusion
- Vorticity
- Vorticity confinement
- Vortex particles
- Smoke particles
- Particle In Cell (PIC) method
- FLuid Implicit Particle (FLIP) method
- There are other ways BFECC, QUICK, CIP..
4Vorticity
The curl operator (vorticity) is defined as
What does this mean?
5Vorticity
The velocity field of a rigid motion
(translationrotation)
Differentiating with respect to position gives
6Vorticity
The velocity (vector) gradient (a matrix/tensor)
of rigid motion
Looking at the skew-symmetric part of general
velocity gradient
7Vorticity
By comparing we arrived at
Does this look familiar?
It is half the curl. We call the curl the
vorticity of the velocity field.
8Vorticity of Rotation Field
9Vorticity Dissipates
- Vorticity creates all the swirly motion, but
dissipates - Two main sources of dissipation
- Numerical diffusion
- Time splitting
10Vorticity Confinement
With no vorticity confinement
With vorticity confinement
Image by Selle et al. 2005
11Vorticity Confinement
(Slide by Jos Stam, SIGGRAPH 2003)
12Vorticity Confinement
(Slide by Jos Stam, SIGGRAPH 2003)
13Vorticity Confinement
(Slide by Jos Stam, SIGGRAPH 2003)
14Whats Wrong with Vorticity Confinement?
- Artifacts, difficulties rising
- Hard to control ?
- ? is the same everywhere
Image by Selle et al. 2005
15Vortex Particle Method
Image by Selle et al. 2005
We want rolling smoke effects that do not have
the artifacts of Vorticity confinement alone.
Vortex Particle Method was used in Star Wars
III.
16Vortex Particles Video
Selle et al.
17Vortex Particle Method
- The basic idea
- Use grid based solver
- Advect particles that carry dynamic vorticity
(magnitude and direction) - Transfer vorticity from particles to grid locally
using vorticity confinement
18Vortex Particle Method
- Recall the momentum conserving part of the Navier
Stokes equations - This can be put into vorticity (curl) form by
taking the curl on both sides
19Vortex Particle Method
20Vortex Particle Method
You should interpret
As a vector-matrix product
21Vortex Particle Method
We simplify the general vortex form of the
momentum equation
We ignore forces on vorticity
We solve vorticity stretching as an ODE
Vorticity advected in the velocity field. Just
particles carrying vorticity around!
22Vortex Particle Method
Finally the vorticity of the particles is
transferred to the grid using a localized
vorticify confinement
Where
is a Gaussian kernel
Since the vorticity is largest at the center of
the particle, xp, we have that
And finally
23Particle Advection
You already know how to do it!
Third order Runge Kutta
24Particle Advection
25Smoke Particles
- The smoke (density) can be represented by
particles that each carry a smoke concentration
sp to avoid numerical dissipation in smoke
advection. - It is interpolated to the grid as (for use by
buoyancy, density, rendering)
26Smoke Particles
27Smoke Particles
We choose the kernel weights such that these two
estimates are equal
28Smoke Particles
29Smoke Particles
- Particles are advected using Runge Kutta
- Particles are seeded in smoke sources, jittered
in space and time. - Small amount of smoke diffusion can be emulated
with small pertubations
30PIC/FLIP
- To avoid numerical dissipation in velocity
advection velocity can be carried by particles as
well. - Needs to be coupled to global pressure projection
solve on the grid.
31PIC/FLIP
32Exercises