fluid simulation methods in video games

15
Vortex-Velocity based Fluid Simulation Reza Nezami Based on Series of Articles by Dr. M.J. Gourlay Fluid Simulation for Games

Upload: reza-nezami

Post on 15-Jul-2015

54 views

Category:

Software


1 download

TRANSCRIPT

Vortex-Velocity based Fluid Simulation

Reza NezamiBased on Series of Articles by Dr. M.J. Gourlay

Fluid Simulation for Games

Motivations

• True Water based Video Games still Missing!

• Big difference between Visual vs Physical Simulations!

• Dawn of Parallelizing API + Multicore HW

• Challenging! Conventional RigidBody/Articulation/Collision based physics not suitable here!

Discretization/Representation

a) Grid Based (Eulerian View, SPH) b) Particle Based (Lagrangian View, DVM),

Fluid Properties/Formula

• Pressure : p

• Viscosity : v

• Density : q

• Temperature : affects the above properties

• Navier-Stokes equation is governing formula for fluid dynamics

Computation Representation

Buoyancy

DVM

• use vortex particles called vortons to represent tiny vortex elements:

Biot-Savart Law (used for advection):

Vorton Dynamics

• With N Vortons, advection computation is O(N^2)

• Too slow, use Vorton Clusters (influence tree)

Hybrid Scheme

• Use grid cell representation to aggregate effect of all vortons in each cell as one

• Fluid is represented by two kind of particles: vortons and tracers. Tracers are passive and only carry momentum, but do not contribute to fluid dynamic.

• Use interpolation to distribute updated grid attributes to all actors (vortons & tracers)

Boundary Conditions / Rigid body interaction

• Various boundary conditions:

• (a) No-through, (b) no-slip, (c) free-slip, and (d) periodic

Ways to satisfy boundary conditions

• Assigning a vorton to satisfy no-through and no-slip boundary conditions:

Implementation

• Use influence tree to compute velocity based on vorticity at each grid point, using Biot-Savart law on the gird:

• Use velocity on the grid to compute its Jacobian used in

Implementation (Cont’d)

• Diffuse term represents dissipation of vorticity cross grid boundaries between neigboring vortons. So we can use this instead:

• Advection in is automatically taken care of by allowing vortons to move in the fluid.

Implementation(Cont’d)

• Final resulting vorticity equation is embarrassingly parallel and could easily be parallelized using say Intel’s TBB.

• Here’s link to sample implementation by Dr. Gourlay:

• http://www.youtube.com/watch?v=MlFAzXeCB80