Particle-Based Fluid

Download Report

Transcript Particle-Based Fluid

Matthias Müller, Barbara Solenthaler,
Richard Keiser, Markus Gross
Eurographics/ACM SIGGRAPH Symposium
on Computer Animation (2005),
 Propose
a new technique to model fluid-fluid
interaction based on Smoothed Particle
Hydrodynamics(SPH)
 Air-water

Air particles are generated only where needed
 The



interaction
simulation of various phenomena
Boiling water
Trapped air
The dynamics of lava lamp
2
 Fluid-solid



Fluids with solid boundaries plays a major role
In order to keep fluids in place (ex. tank)
Has been addressed in many papers
 Mutual

interaction of different kinds of fluids
Interesting phenomena




interaction
In boiling water, A liquid interacts with a gas
When water flows into a glass, air pockets get trapped
in the fluid and form bubbles
In a lava lamp, two types of fluids interact
But has not received as much attention in CG
3
 With

The simulation of multiple fluids or multiple
phases is a difficult problem
 With



Eulerian, grid-based methods
a particle method
Each particle have own attributes
Properties can be mixed arbitrarily
Easily generated and deleted dynamically
4
 Multiple



Simulate fluids with different particle types
Parameters are stored on each particle
Extend the equations
 Trapped


air
Simulate trapped air by generating air particle
dynamically
Isolated air particles are deleted
 Phase

fluids
transition
Boiling water is modeled by changing the types
and densities of particles dynamically
5
 Introduce

Realistic animation of liquids [FOSTER et al. 99]
 Stable

fluid simulation to CG
semi-Lagrangian advection
Stable fluid [STAM 99]
6
 Level


set methods to track the liquid surface
Practical animation of liquids[FOSTER et al. 01]
Animation and rendering of complex water
surfaces [ENRIGHT et al. 02]
7
 Fluid

solid interaction in the Eulerian setting
Rigid fluid: animating the interplay between rigid
bodies and fluid [CARLSON et al. 04]
8
 Multiphase



fluid and bubbles
Eulerian approach is a difficult problem
Direct numerical simulations of threedimensional bubbly flows [BUNNER et al. 99]
Simulation of a cusped bubble rising in a
viscoelastic fluid with a new numerical method
[WAGNER et al. 00]
9
 Simpler

method to simulate bubbles
Better with bubbles: enhancing the visual realism
of simulated fluid [GREENWOOD et al. 04]


Generate passive air-particle and advect them using
the Eulerian velocity field
One-way coupling method
10
 Volume

of fluid method(VOF)
Animation of bubbles in liquid [HONG et al. 03]

Smaller bubbles are simulated using a passive particle
system
11
 Lagrangian,


Allow the seamless modeling of fine to large
scale fluid-fluid interaction phenomena
Most models are based on the SPH formulation
 Animate

particle-based fluid models
highly deformable solid objects
Smoothed particles: A new paradigm for
animating highly deformable bodies
[DESBRUN et al. 96]
12

Lava


Animating lava flows
[STORA et al. 99]
Fluid simulation

Particle-based fluid
simulation for
interactive application
[MÜLLER et al. 03]
13
 Method

for fluid-solid interaction
Interaction of fluids with deformable solids
[MÜLLER et al. 04]
14
A

fluid is represented by a set of particles
Each Particle have position xi, mass mi,
additional attribute Ai
 Define
how to compute smooth continuous
field A(x)


ρi is the density of particle i
W(r,h) is a smoothing kernel
15
 Compute

density ρi
W(r,h) is typically a smooth, radially symmetric,
normalized function
16

Gradient and Laplacian of A(x)

Compute particle body forces
rij is the distance vector xi-xj
 pi = k(ρi – ρ0)

17
 Navier-Stokes


equation
Conservation of mass
Conservation of momentum
 Navier-Stokes
equation for particle system
Pressure
Viscosity
External forces
18
 Standard
approach for a single fluid, many
attributes are stored globally (e.g. m, ρ0)
 New
approach for multiple fluids, Each
particle carries all attributes individually
 Modify
viscosity force Eq.
19
 The
parameter ρ0 is defined per particle
 pi = k(ρi – ρ0)
Two fluids
mixed
Density gradient
Pressure
gradient
Less dense fluid
to rise inside
the denser fluid
20
 Water


and oil are immiscible
Water molecules are polar, oil molecules are not
The energy of bonded water molecules in cluster
is lower than the energy of single water
molecules dispersed
 Interface


body force
Liquids trying to minimize the curvature κ
Proportional to κ and the interface tension
coefficient σi
21
 Color
attribute setting
 Normal

liquid 1
Interface
liquid 2
on the interface
n = ∇ci
 Curvature

Surface
κ
κ = -∇2ci/|n|
22
 Diffusion

equation
Describes how heat gets distributed in a fluid
SPH
formalism

Integrate the attribute using Euler scheme

Temperature influence the rest density
(α : user defined constant)
23
 Standard


SPH approach
Air is not explicitly modeled
Trapped air will immediately disappear
 Trial


Explicitly simulate air as a separate fluid
But large number of air particles is needed
 Solution

Generate air particles whenever bubbles are
about to be formed and to delete the particles
when they don’t contribute to the simulation
anymore
24
 Air
particle need to be generated near the
surface of liquid

The gradient of the cs field is large
 The
generation stops when there are enough
air particles


Implicit color attribute cp
Because only liquid particles generate air
particles, It is enough to test ∇cp
25
 Location

Shifted by the vector -d∇cp
 The

of air particle
velocity of air particle
Initialized with the velocity
of the liquid particle
 Air
Air particle
particle is only a good
candidate for being
trapped if it is located
below the liquid front
26
 Delete
air particles whose ∇cs is sufficiently
small
 Problem 1
Air particles inside large trapped bubbles get
deleted
 Testing whether ∇cp is larger than threshold

 Problem
2
Isolated strayed air particles
 Checking whether actual density get below
threshold

27
 The
density of water is about a thousand
times the density of air

Large ratio can cause stability problems
 Rest


density in demo
Water 1000kg/m3, Air : 100 kg/m3
Ratio 10,bubbles to rise more slowly in water
 The
SPH is not suited for small air bubbles
 Introduce an artificial buoyancy force

water
g is gravity and b a user parameter
air
28
 Diffusion
 Lava
effect
lamp
4800 blue, 1200 red particles
Simulation time 11fps , rendering 3min per frame
29
 Pouring
water into a glass
3000 water particle
400 air particle
Simulation : 18~40 fps
Rendering : 8min per frame
30
 Boiling



water
Bubbles form first on solid surface in contact
with the liquid at cavitation sites
5500 water particles & 3000 flame particles
Simulation 8 fps, rendering 5min per frame
31
 Enhance
particle based fluid simulation
 Particles are particularly well suited for
modeling the interaction of different types
of fluids and phase transitions
 Particles can be generated and deleted
dynamically
 Limitation



of the SPH approach
Single particles or badly sampled droplets
Proposed a technique to circumvent the problem
Different ways such as bilateral filtering
32