Fluid Simulation for Computer Animation - PowerPoint PPT Presentation

About This Presentation
Title:

Fluid Simulation for Computer Animation

Description:

ut = k 2u (u )u p f. Incompressibility. Change in Velocity. Advection. Diffusion ... ut = (u )u. uxt = (u )ux. uyt = (u )uy. Two separate advections: ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 63
Provided by: georgeb57
Category:

less

Transcript and Presenter's Notes

Title: Fluid Simulation for Computer Animation


1
Fluid Simulation forComputer Animation
  • Greg Turk
  • College of Computing and GVU Center
  • Georgia Institute of Technology

2
Why Simulate Fluids?
  • Feature film special effects
  • Computer games
  • Medicine (e.g. blood flow in heart)
  • Because its fun

3
Fluid Simulation
  • Called Computational Fluid Dynamics (CFD)
  • Many approaches from math and engineering
  • Graphics favors finite differences
  • Jos Stam introduced fast and stable methods to
    graphics Stam 1999

4
Navier-Stokes Equations
??u0 ut k?2u (u??)u ?p f
Incompressibility
5
Navier-Stokes Equations
??u0 ut k?2u (u??)u ?p f
Incompressibility
Diffusion
Pressure
Advection
Body Forces
Change in Velocity
6
Finite Differences Grids
  • All values live on regular grids
  • Need scalar and vector fields
  • Scalar fields amount of smoke or dye
  • Vector fields fluid velocity
  • Subtract adjacent quantities to approximate
    derivatives

7
Scalar Field (Smoke, Dye)

5.1
1.2
3.7
cij
8
Diffusion
cij
9
Diffusion
ct k?2c
cijnew cij k Dt (ci-1j ci1j cij-1
cij1 - 4cij)
10
Diffusion Blurring
11
Vector Fields (Fluid Velocity)
uij (ux,uy)
12
Vector Field Diffusion
ut k?2u
blur the x-velocity and the y-velocity
13
Effect of Viscosity
Low Medium High Very
High
  • Each one is ten times higher viscosity than the
    last

Melting and Flowing Mark Carlson, Peter J.
Mucha, Greg Turk Symposium on Computer Animation
2002
14
Low Viscosity
15
High Viscosity
16
Variable Viscosity
  • Viscosity can vary based on position
  • Viscosity field k can change with temperature
  • Need implicit solver for high viscosity

17
Wax
18
(No Transcript)
19
(No Transcript)
20
Navier-Stokes Equations
??u0 ut k?2u (u??)u ?p f
Incompressibility
Diffusion
Pressure
Advection
Body Forces
Change in Velocity
21
Advection Pushing Stuff
22
Advection
23
Advection
0.3
2.7
0.3
24
Scalar Field Advection
ct (u??)c
25
Vector Field Advection
ut (u??)u
push around x-velocity and y-velocity
26
Advection
  • Easy to code
  • Method stable even at large time steps
  • Problem numerical inaccuracy diffuses flow

27
Diffusion/dissipation in first order advection
After 360 degree rotation using first order
advection
Original Image
28
Solution BFECC
1) Perform forward advection 2) Do backward
advection from new position 3) Compute error and
take correction step 4) Do forward advection from
corrected position
Flowfixer Using BFECC for Fluid
Simulation ByungMoon Kim, Yingjie Liu, Ignacio
Llamas, Jarek Rossignac Eurographics Workshop on
Natural Phenomena 2005
29
Intuition to BFECC
30
(No Transcript)
31
Navier-Stokes Equations
??u0 ut k?2u (u??)u ?p f
Incompressibility
Diffusion
Pressure
Advection
Body Forces
Change in Velocity
32
Divergence
High divergence
33
Enforcing Incompressibility
  • First do velocity diffusion and advection
  • Find closest vector field that is
    divergence-free
  • Need to calculate divergence
  • Need to find and use pressure

34
Measuring Divergence
??u?
??uij(uxi1j - uxi-1j) (uyij1-uyij-1)
35
Pressure Term
unew u ?p
Take divergence of both sides
?? unew ?? u ???p
?? u ?2p
36
Pressure Term
?? u ?2p
pnew p e(?? u - ?2p)
Let dij ?? uij
pnewij pij e(dij - (pi-1j pi1j pij-1
pij1 - 4pij))
37
Pressure Term
unew u ?p
and velocity is now divergence-free
Found nearest divergence-free vector field to
original.
38
Fluid Simulator
  1. Diffuse velocity
  2. Advect velocity
  3. Add body forces (e.g. gravity)
  4. Pressure projection
  5. Diffuse dye/smoke
  6. Advect dye/smoke

39
Real-Time Fluid Dynamics for Games Jos Stam,
March 2003 (CDROM link is to source code)
www.dgp.toronto.edu/people/stam/reality/Research/p
ubs.html
40
Rigid Objects
  • Want rigid objects in fluid
  • Use approach similar to pressure projection

Rigid Fluid Animating the Interplay Between
Rigid Bodies and Fluid Mark Carlson, Peter J.
Mucha and Greg Turk Siggraph 2004
41
Rigid Fluid Method
1) Solve Navier-Stokes on entire grid, treating
solids exactly as if they were fluid
2) Calculate forces from collisions and relative
density
3) Enforce rigid motion for cells inside rigid
bodies
42
(No Transcript)
43
Small-scale liquid-solid Interactions
What makes large water and small water behave
differently? Surface Tension (water 72
dynes/cm at 25º C) Viscosity (water 1.002 x 10-3
Ns/m2 at 20º C)
Lake ( gt1 meter)
Water drops (millimeters)
44
Surface Tension
Normal (always pointing outward) Surface Tension
Force
45
Water/Surface Contact
hydrophillic
hydrophobic
46
Contact Front
47
Virtual Surface Method
Air
Liquid
Solid
48
Virtual Surface Method
1) Creating a virtual surface 2) Estimate
curvature from new fluid surface 3) Kink will
push the fluid towards stable contact angle
49
Virtual Surface Method
1) Creating a virtual surface 2) Estimate
curvature from new fluid surface 3) Kink will
push the fluid towards stable contact angle
50
(No Transcript)
51
Swimming Creatures
  • Create assemblies of rigid objects (figures with
    joints)
  • Use Rigid Fluid method
  • Work in progress (Nipun Kwatra, Chris Wojtan,
    Peter J. Mucha, Irfan Essa, Greg Turk)

52
(No Transcript)
53
(No Transcript)
54
(No Transcript)
55
Erosion and Corrosion
  • Fluids modify rigid objects
  • Erosion fluid sweeps away particles
  • Corrosion fluid eats away objects
  • Work in progress (Chris Wojtan, Peter J. Mucha,
    Mark Carlson, Greg Turk)

56
(No Transcript)
57
(No Transcript)
58
(No Transcript)
59
(No Transcript)
60
Fluid Researchers at Georgia Tech
Mark Carlson Peter J. Mucha Huamin Wang ByungMoon
Kim Yingjie Liu Ignacio Llamas Jarek
Rossignac Chris Wojtan Nipun Kwatra Irfan
Essa Greg Turk
61
Questions?
62
Implementation of BFECC
A Advection step u velocity field
h A(g, u) r A(h,-u) s g (g-r)/2 g
A(s,u)
Write a Comment
User Comments (0)
About PowerShow.com