Particle-based fluid simulation for interactive applications

Download Report

Transcript Particle-based fluid simulation for interactive applications

Particle-based fluid simulation
for interactive applications
Matthias Müller
David Charypar
Markus Gross
9557501 陳岳澤
• Introduction
• Navier-Stokes Equation
• SPH (Smoothed Particle Hydrodynamics )
• Smooth Kernel
• Marching Cubes
• Result
• 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
Conservation of momentum equation
Three components:
– Pressure term
– External force term
– Viscosity term
v: velocity,
g: external force,
 : density,
p: pressure,
: viscosity coefficient
Navier-Stokes Equation
• The acceleration ai of particle i is
 ai 
i (fi is body force)
• Using ai , we can get velocity and position
of particle i
• Originally developed for astrophysical
problems (1977).
• Interpolation method for particles.
• Properties that are defined at discrete
particles can be evaluated anywhere in
• Uses smoothing kernels to distribute
• Smoothing of attribute A
mj: mass
j : density
Aj: quantity to be interpolated
W: smoothing kernel
Particle density
• Smoothing of attribute A
• Particle density
 s r    m j W r  rj , h   m jW r  rj , h
Pressure Term
• Navier-Stokes Equation
• Pressure Term
Viscosity term
• Navier-Stokes Equation
• Viscosity Term
External force term
• Other external forces are directly
applied to the particles.
• Collisions: In case of collision the
normal component of the velocity is
Smoothing Kernel
• Has an impact on the stability and
speed of the simulation.
– ex: Avoid square-roots for distance
• Sample smoothing kernel:
Smoothing Kernel
all points inside a radius
of ‘h’ are considered for
Thick line: the kernel
Thin line: the gradient
of kernel
Dashed line: the
laplacian of kernel
Smoothing Kernel
• For n particles n2 potential interactions!
• To reduce to linear complexity O(n2)
define interaction cutoff distance h
Smoothing Kernel
• Fill particles into grid with spacing h
• Only search potential neighbors in
adjacent cells
Marching Cubes
• To visualize the free surface
Marching Cubes
Interactive Simulation (5fps)
2200 particle
Point Splatting
Marching Cubs