particle-based fluid simulation for interactive applications matthias m ü ller david charypar...

18
Particle-based fluid Particle-based fluid simulation for interactive simulation for interactive applications applications Matthias Müller Matthias Müller David Charypar David Charypar Markus Gross Markus Gross 9557501 9557501 陳陳陳 陳陳陳

Post on 19-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

Particle-based fluid simulation Particle-based fluid simulation for interactive applicationsfor interactive applications

Matthias MüllerMatthias MüllerDavid CharyparDavid Charypar

Markus GrossMarkus Gross

9557501 9557501 陳岳澤陳岳澤

OutlineOutline• Introduction• Navier-Stokes Equation• SPH (Smoothed Particle Hydrodynamics )

• Smooth Kernel• Marching Cubes• Result

IntroductionIntroduction• Navier-Stokes Equation describe the

motion of fluid substances such as liquids and gases

• Use Smoothed Particle Hydrodynamics (SPH) to simulate fluids with free surfaces.

• Interactive simulation (about 5 fps).

Navier-Stokes Equation Navier-Stokes Equation -1-1

Conservation of momentum equation

Three components:– Pressure term– External force term– Viscosity term

v: velocity, : density, p: pressure, g: external force, : viscosity coefficient

Navier-Stokes Equation Navier-Stokes Equation -2-2

• The acceleration a i of particle i is

(fi is body force)

• Using a i , we can get velocity and position of particle i

i

ii

i fa

t

v

SPH SPH -1-1

• Originally developed for astrophysical problems (1977).

• Interpolation method for particles.• Properties that are defined at discrete particle

s can be evaluated anywhere in space.• Uses smoothing kernels to distribute quantitie

s.

SPH SPH -2-2

• Smoothing of attribute A

mj: massj : densityAj: quantity to be interpolatedW: smoothing kernel

h

Particle densityParticle density• Smoothing of attribute A

• Particle density

hrrWmhrrWmr jj

jjj

j

jjs ,,

Pressure TermPressure Term• Navier-Stokes Equation

• Pressure Term

Viscosity termViscosity term• Navier-Stokes Equation

• Viscosity Term

External force termExternal force term• Other external forces are directly applie

d to the particles.

• Collisions: In case of collision the normal component of the velocity is flipped.

Smoothing Kernel Smoothing Kernel -1-1

• Has an impact on the stability and speed of the simulation.– ex: Avoid square-roots for distance

computation.

• Sample smoothing kernel:

Smoothing Kernel Smoothing Kernel -2-2

all points inside a radius of ‘h’ are considered for “smoothing”.

Thick line: the kernel Thin line: the gradient of k

ernel Dashed line: the laplacian

of kernel

Smoothing Kernel Smoothing Kernel -3-3

• For n particles n2 potential interactions!• To reduce to linear complexity O(n2)

define interaction cutoff distance h

h

Smoothing Kernel Smoothing Kernel -4-4

• Fill particles into grid with spacing h• Only search potential neighbors in

adjacent cells

h

h

Marching Cubes Marching Cubes -1-1

• To visualize the free surface

Marching Cubes Marching Cubes -2-2

ResultResult

2200 particle Point Splatting Marching Cubs

Interactive Simulation (5fps)