(March 14, 2005)
James Skorupski
Graham O’Daniel
Abstract
Generating fluid simulations in real-time is a desirable ability for applications such as video games and cinema. There are a number of approaches available to work with in order to approximate fluids, with each introducing particular drawbacks. Some simulations approximate the surface of a liquid using reflection maps, but do nothing to address the fluid’s collision with objects. Other simulations approximate water through the use of free moving spheres, which when drawn together and proper filters are applied in the graphics pipeline can appear like fluid. The approach we take in this project is one based on Smooth Particle Hydrodynamics, or SPH. SPH focuses on representing a fluid as a mass of particles, with many different forces applied to the particles, both internal and external forces, by using the Navier-Stokes equations for fluid dynamics. By applying a marching cubes implementation to the simulation, a semi-realistic surface can be approximated from the density of particles. Our program also handles collisions on a per-particle basis with implicit surfaces. The particle system and can be extended to large particle systems given adequate computing power.
Features
SPH
based particle dynamics with the following forces
Viscosity
– resistance to flow of a liquid
Pressure
– force exerted on particles from other particles
Gravity
– downward force of gravity (held constant in simulation)
Other
external forces
Particle
collision with implicit surfaces
“Leap-frog”
integration method for accurate time steps
Marching
cubes (see reference)
Executables
Pentium III or better optimized executable
Pentium IV or Athlon 64 or better optimized executable
Screenshots
User Guide
S toggles the drawing of spatial
buckets as yellow cubes.
X toggles the marching cubes algorithm.
The
Left arrow rotates the camera clockwise
around the center of the scene.
The
Right arrow rotates the camera
counter clockwise around the center of the scene.
The
Up arrow rotates the camera towards
the top about the X-axis around the center of the scene.
The
Down arrow rotates the camera
towards the bottom about the X-axis around the center of the scene.
L toggles the static sphere in the
center of the scene.
O decreases the time step used in fixed
time steps mode.
P increases the time step used in fixed
time steps mode.
N decreases the radius of the static
sphere at the center of the scene.
M increases the radius of the static
sphere at the center of the scene.
C changes the color of the lighting on
the scene.
G changes whether gravity is applied to
the particles or not.
A changes whether a rotational force is
applied to the particles or not.
Escape quits the program.
Space applies a force to the particles
pushing them to the left of the scene.
Future Improvements
v Implement surface tension
v Optimize marching cubes to reuse previous calculations
v More user forces
v Larger particle systems (1000+)
v More implicit surfaces/containers
References
Stewart, Nigel. “GLT OpenGL – C++ Toolkit.” http://www.nigels.com/glt. Last visited 3/12/05.
Muller, Mathias et al. “Particle-Based Fluid Simulation for Interactive Applications.” SIGGRAPH 2003.