Download Powerpoint - UBC Computer Science

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ferrofluid wikipedia , lookup

Velocity-addition formula wikipedia , lookup

Rigid body dynamics wikipedia , lookup

Renormalization group wikipedia , lookup

Work (physics) wikipedia , lookup

Biofluid dynamics wikipedia , lookup

Blade element momentum theory wikipedia , lookup

History of fluid mechanics wikipedia , lookup

Fluid dynamics wikipedia , lookup

Buoyancy wikipedia , lookup

Transcript
A Fast Variational
Framework for
Accurate Solid-Fluid
Coupling
Christopher Batty
Florence Bertails
Robert Bridson
University of British Columbia
Motivation
• Goal: Simulate fluids coupled to objects.
• Extend the basic Eulerian approach:
– Advect fluid velocities
– Add forces (eg. gravity)
– Enforce incompressibility via pressure projection
• See eg. [Stam ‘99, Fedkiw et al. ‘01, Foster & Fedkiw ‘01,
Enright et al. ‘02, etc.]
Motivation
• Cartesian grid fluid simulation is great!
– Simple
– Effective
– Fast data access
– No remeshing needed
• But…
Motivation
• Achilles’ heel: Real objects rarely align with grids.
Overview
Three parts to our work:
1) Irregular static objects on grids
2) Dynamic & kinematic objects on grids
3) Improved liquid-solid boundary conditions
Previous Work
• First solution  Voxelize
– [Foster & Metaxas ’96]
• Easy!
• “Stairstep” artifacts
• Artificial viscosity
• Doesn’t converge under refinement!
Previous Work
• Better solution  Subdivide nearby
– [Losasso et al. ‘04]
• Stairs are smaller
• But problem remains
Previous Work
• Better yet  Mesh to match objects
– [Feldman et al. ‘05]
• Accurate!
• Needs remeshing
• Slower data access
• Trickier interpolation
• Sub-grid objects?
And now… back to the future?
• We’ll return to regular grids
– But achieve results like tet meshes!
Pressure Projection
• Converts a velocity field to be
incompressible (or divergence-free)
• No expansion or compression
• No flow into objects
Images courtesy of [Tong et al. ‘03]
Pressure Projection
• We want the “closest” incompressible
velocity field to the input.
• It’s a minimization problem!
Key Idea!
• Distance metric in the space of fluid velocity fields is
kinetic energy.
KE
n +1
=
1
 2 r u
2
+
n 1
fluid
• Minimizing KE wrt. pressure is equivalent to the
classic Poisson problem!
Minimization Interpretation
• Fluid velocity update is:
u
n +1
Dt
~
= u - p
r
• Resulting minimization problem is:
1 ~ Dt
arg min  r u - p
r
p
2
fluid
2
What changes?
• Variational principle automatically enforces boundary
conditions! No explicit manipulation needed.
• Volume/mass terms in KE account for partial fluid cells.
– Eg.
KE i +1/ 2
1
2
= r (voli +1/ 2 )(ui +1/ 2 )
2
• Result: Easy, accurate fluid velocities near irregular
objects.
Measuring Kinetic Energy
Discretization Details
• Normal equations always give an SPD linear system.
– Solve with preconditioned CG, etc.
• Same Laplacian stencil, but with new volume terms.
Classic:
- (1) pi +1 + (2) pi - (1) pi -1 (1)ui +1/ 2 - (1)ui -1/ 2
=
2
Dx
Dx
Variational:
- (Vi +1/ 2 ) pi +1 + (Vi +1/ 2 + Vi -1/ 2 ) pi - (Vi -1/ 2 ) pi -1 (Vi +1/ 2 )ui +1/ 2 - (Vi -1/ 2 )ui -1/ 2
=
2
Dx
Dx
Object Coupling
• This works for static boundaries
• How to extend to…
– Two-way coupling?
• Dynamic objects fully interacting with fluid
– One-way coupling?
• Scripted/kinematic objects pushing the fluid
Object Coupling – Previous Work
• “Rigid Fluid” [Carlson et al ’04]
– Fast, simple, effective
– Potentially incompatible
boundary velocities, leakage
• Explicit Coupling [Guendelman
et al. ’05]
– Handles thin shells, loose
coupling approach
– Multiple pressure solves per
step, uses voxelized solve
Object Coupling – Previous Work
• Implicit Coupling [Klingner et al ‘06, Chentanez et al.’06]
– solves object + fluid motion simultaneously
– handles tight coupling (eg. water balloons)
– requires conforming (tet) mesh to avoid artifacts
A Variational Coupling Framework
Just add the object’s kinetic energy to the system.
2
1
1 *
KE =  r u + V M solid V
2
fluid 2
Automatically gives:
–
incompressible fluid velocities
–
compatible velocities at object surface
A Coupling Framework
Two components:
1) Velocity update:
How does the pressure force update the object’s
velocity?
2) Kinetic energy:
How do we compute the object’s KE?
Example: Rigid Bodies
1) Velocity update:
Force = -  pnˆ
solid
Torque = -  ( x - X CM )  pnˆ
solid
2) Kinetic Energy:
1
1 2
2
KE = mv + Iω
2
2
Discretize consistently with fluid, add to minimization, and solve.
Sub-Grid Rigid Bodies
Interactive Rigid Bodies
One Way Coupling
• Conceptually, object mass  infinity
• In practice: drop coupling terms from matrix
Paddle Video
Wall Separation
• Standard wall boundary condition is u·n = 0.
– Liquid adheres to walls and ceilings!
• Ideally, prefer u·n ≥ 0, so liquid can separate
– Analogous to rigid body contact.
Liquid Sticking Video
Wall Separation - Previous Work
• If ũ·n ≥ 0 before projection, hold u fixed.
– [Foster & Fedkiw ’01, Houston et al ’03, Rasmussen et al ‘04]
• Inaccurate or incorrect in certain cases:
Wall Separation
• Two cases at walls:
– If p > 0, pressure prevents penetration (“push”)
– If p < 0, pressure prevents separation (“pull”)
• Disallow “pull” force:
– Add p ≥ 0 constraint to minimization
– Gives an inequality-constrained QP
– u·n ≥ 0 enforced implicitly via KKT conditions
Liquid Peeling Video
Future Directions
• Robust air-water-solid
interfaces.
• Add overlapping ghost
pressures to handle
thin objects, à la [Tam
et al ’05]
Future Directions
• Explore scalable QP solvers for 3D wallseparation.
• Extend coupling to deformables and other
object models.
• Employ linear algebra techniques to
accelerate rigid body coupling.
Summary
• Easy method for accurate sub-grid fluid
velocities near objects, on regular grids.
• Unified variational framework for coupling
fluids and arbitrary dynamic solids.
• New boundary condition for liquid allows
robust separation from walls.
Thanks!