Fluid Animation CSE 3541 By: Matt Boggus.

Slides:



Advertisements
Similar presentations
Stable Fluids A paper by Jos Stam.
Advertisements

My First Fluid Project Ryan Schmidt. Outline MAC Method How far did I get? What went wrong? Future Work.
ECMWF Governing Equations 1 Slide 1 Governing Equations I by Clive Temperton (room 124) and Nils Wedi (room 128)
Realistic Simulation and Rendering of Smoke CSE Class Project Presentation Oleksiy Busaryev TexPoint fonts used in EMF. Read the TexPoint manual.
Simulation of Fluids using the Navier-Stokes Equations Kartik Ramakrishnan.
Matthias Müller, Barbara Solenthaler, Richard Keiser, Markus Gross Eurographics/ACM SIGGRAPH Symposium on Computer Animation (2005),
Mode-Splitting for Highly Detail, Interactive Liquid Simulation H. Cords University of Rostock Presenter: Truong Xuan Quang.
1/32 Real Time Fluids in Games Matthias Müller-Fischer, ageia.
More Accurate Pressure Solves. Solid Boundaries  Voxelized version works great if solids aligned with grid  If not: though the error in geometry is.
Intro to Fluid Simulation (I) Jeff Pool COMP
Particle-based fluid simulation for interactive applications
University of North Carolina - Chapel Hill Fluid & Rigid Body Interaction Comp Physical Modeling Craig Bennetts April 25, 2006 Comp Physical.
Combined Lagrangian-Eulerian Approach for Accurate Advection Toshiya HACHISUKA The University of Tokyo Introduction Grid-based fluid.
Modeling Fluid Phenomena -Vinay Bondhugula (25 th & 27 th April 2006)
Visual Simulation of Smoke SIGGRAPH’01 Ronald Fedkiw, Jos Stam and Henrik Wann Jensen Stanford University & Alias|wavefront.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Intro to Computational Fluid Dynamics Brandon Lloyd COMP 259 April 16, 2003 Image courtesy of Prof. A.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Introduction to Modeling Fluid Dynamics 1.
Fluid Simulation using CUDA Thomas Wambold CS680: GPU Program Optimization August 31, 2011.
By Michael Su 04/16/2009.  Introduction  Fluid characteristics  Navier-Stokes equation  Eulerian vs. Lagrangian approach  Dive into the glory detail.
Fluid Simulation for Graphics
Modeling, Simulating and Rendering Fluids Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan.
Fluid Simulation for Computer Animation Greg Turk College of Computing and GVU Center Georgia Institute of Technology.
Motivation  Movie  Game  Engineering Introduction  Ideally  Looks good  Fast simulation  Looks good?  Look plausible  Doesn’t need to be exactly.
The Air-Sea Momentum Exchange R.W. Stewart; 1973 Dahai Jeong - AMP.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Fluids.
Fluid Animation CSE 3541 Matt Boggus. Procedural approximations – Heightfield fluids Mathematical background – Navier-Stokes equation Computational models.
Fast Hydraulic Erosion Simulation and Visualization on GPU
CEE 262A H YDRODYNAMICS Lecture 5 Conservation Laws Part I 1.
A Hybrid Particle-Mesh Method for Viscous, Incompressible, Multiphase Flows Jie LIU, Seiichi KOSHIZUKA Yoshiaki OKA The University of Tokyo,
Animation of Fluids.
COMPUTATIONAL FLUID DYNAMICS IN REAL-TIME An Introduction to Simulation and Animation of Liquids and Gases.
Smoothed Particle Hydrodynamics (SPH) Fluid dynamics The fluid is represented by a particle system Some particle properties are determined by taking an.
A Unified Lagrangian Approach to Solid-Fluid Animation Richard Keiser, Bart Adams, Dominique Gasser, Paolo Bazzi, Philip Dutré, Markus Gross.
A particle-gridless hybrid methods for incompressible flows
Momentum Equations in a Fluid (PD) Pressure difference (Co) Coriolis Force (Fr) Friction Total Force acting on a body = mass times its acceleration (W)
Simplified Smoothed Particle Hydrodynamics for Interactive Applications Zakiya Tamimi Richard McDaniel Based on work done at Siemens Corporate.
Taming a Wild River Jeff Lander Darwin 3D
Detail-Preserving Fluid Control N. Th ű rey R. Keiser M. Pauly U. R ű de SCA 2006.
Stable, Circulation- Preserving, Simplicial Fluids Sharif Elcott, Yiying Tong, Eva Kanso, Peter Schröder, and Mathieu Desbrun.
J.-Ph. Braeunig CEA DAM Ile-de-FrancePage 1 Jean-Philippe Braeunig CEA DAM Île-de-France, Bruyères-le-Châtel, LRC CEA-ENS Cachan
FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.
Matthew Zhu. At each time step calculate each particle’s acceleration and use Verlet numerical integration to update its position, velocity, and grid.
Perpetual Visualization of Particle Motion and Fluid Flow Presented by Tsui Mei Chang.
CP502 Advanced Fluid Mechanics
Smoothed Particle Hydrodynamics Matthew Zhu CSCI 5551 — Fall 2015.
CP502 Advanced Fluid Mechanics
1 Equations of Motion September 15 Part Continuum Hypothesis  Assume that macroscopic behavior of fluid is same as if it were perfectly continuous.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Water Computational Fluid Dynamics Volumes Lagrangian vs. Eulerian modelling Navier-Stokes equations.
SIGGRAPH 2005 신 승 호 신 승 호. Water Drops on Surfaces Huamin Wang Peter J. Mucha Greg Turk Georgia Institute of Technology.
Animating smoke with dynamic balance Jin-Kyung Hong Chang-Hun Kim 발표 윤종철.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Computational Fluid Dynamics.
CE 3305 Engineering FLUID MECHANICS
Character Animation Forward and Inverse Kinematics
Application of smooth particle hydrodynamics on biomass burning
Continuum Mechanics (MTH487)
CE 3305 Engineering FLUID MECHANICS
DIFFERENTIAL EQUATIONS FOR FLUID FLOW Vinay Chandwani (Mtech Struct.)
International Institute of Information Technology, Hyderabad
ATCM 6317 Procedural Animation
Continuum Mechanics for Hillslopes: Part IV
Computer Graphics Imaging Ying Zhu Georgia State University
Introduction to Fluid Dynamics & Applications
Today’s Lecture Objectives:
Procedural Animation Lecture 11: Fluid dynamics
MAE 3241: AERODYNAMICS AND FLIGHT MECHANICS
5. Describing Flow CH EN 374: Fluid Mechanics.
Particle-in-Cell Methods
David Marshburn Comp 259 April 17, 2002
Fluid Simulation.
Presentation transcript:

Fluid Animation CSE 3541 By: Matt Boggus

Overview Procedural approximations Mathematical background Computational models for representing fluids Using the computational models Forces “Stable fluids” by Stam

Real-time fluids Goals: Simulate the effect, not the cause Cheap to compute Low memory consumption Stability Plausibility Interactivity Simulate the effect, not the cause

Real-time fluids Procedural water Particle systems Heightfield fluids Unbounded surfaces, oceans Particle systems Splashing, spray, puddles, smoke, bubbles, rain Heightfield fluids Ponds, lakes, rivers

Procedural water – cos wave y = A cos (2 * pi * x / T) https://www.desmos.com/calculator Visualization of parameter changes using graphing calculator

Superimposed linear waves Normal vector displacement Height displacement

Heightfield fluid Function u(x,y) gives height at (x,y) Store height values in an array u[x,y]

Can this wave be represented using a heightfield?

Setting and updating heightfield fluids Methods Pressure or height differences between cells Collision detection and displacement Additional considerations When updating, a second heightfield may be used to preserve the values from the previous frame Handle boundary cases differently

Pressure/Height differences Initialize u[i,j] with some interesting function Initialze v[i,j]=0 loop v[i,j] += (u[i-1,j] + u[i+1,j] + u[i,j-1] + u[i,j+1])/4 – u[i,j] v[i,j] *= 0.99 u[i,j] += v[i,j] endloop Clamp at boundary Algorithm from Fast Water Simulation for Games Using Height Fields Linked at end of slides

Example videos Real-Time Eulerian Water Simulation Grid based https://www.youtube.com/watch?v=Jl54WZtm0QE SPH based real-time liquid simulation Particle based https://www.youtube.com/watch?v=6CP5QvfuD_w

Fluid Models Grid-based (Eulerian) d is density Particle-based (Lagrangian) Hybrid Animate the particles “Collect” particles to compute density

Navier-Stokes Equation Momentum equation Incompressibility ut = k2u –(u)u – p + f Change in velocity Diffusion/ Viscosity Advection Pressure Body Forces u: the velocity field u=0 k: kinematic viscosity

Diffusion/Viscosity Force Limit shear movement of particles in the liquid The momentum between the neighbour particles are exchanged Pp Ppn

Adhesion Force Attract particles to each other and to other objects (similar to gravitational force) The adhesion force between (left) honey-honey, (middle) honey-ceramic and (right) non-mixing liquid

Advection Force Velocity grid

Pressure force Pressure figure from Huamin Wang’s 3541 slides

Pressure force

Friction Force Dampen movement of particles in contact with objects in the environment Scale down the velocity by a constant value

Rendering particles Figure from https://mdzahidh.github.io/cs148/assets/slides/13-Physically%20Based%20Animation.pdf

Heightfield mesh particle collection Step 1. Zero out all u[i,j] Step 2. For each u[i,j], determine which particles are closet to it (bounding box collision test) Alternative Step 2. For each particle, determine which (i,j) it is closest to (translate position half a cell, then floor it)

Case Study: A 2D Fluid Simulator Incompressible, viscous fluid Assuming the gravity is the only external force No inflow or outflow Constant viscosity, constant density everywhere in the fluid

Stable Fluids – overview of data Velocity grid Density grid Move densities around using velocity grid and dissipate densities Move velocities around using velocity grid and dissipate velocities Walkthrough: http://www.dgp.utoronto.ca/~stam/reality/Talks/FluidsTalk/FluidsTalkNotes.pdf Source code: http://www.autodeskresearch.com/publications/games

Additional readings Fluid Simulation for Computer Animation (SIGGRAPH course) The original stable fluids paper An update to the stable fluids work Fast Water Simulation for Games Using Height Fields (GDC talk)

Additional Slides

Heightfield mesh creation and cell iteration Covered earlier with terrains

Heightfield or Heightmap terrain data 2D greyscale image Surface in 3D space Images from http://en.wikipedia.org/wiki/Heightmap

Heightfield mesh creation and cell iteration u[x,y] ; dimensions n by n

Heightfield mesh creation and cell iteration Quad[i,j] such that i = 0, j = 0; Vertices are U[0,0], U[1,0], U[1,1], U[0,1] U[i,j], U[i+1,j], U[i+1,j+1], U[i,j+1]

Heightfield mesh creation and cell iteration Inner loop iterates over i, the x coordinate Last quad: i=5 (i = n-1)

Heightfield mesh creation and cell iteration Outer loop iterates over j, the y coordinate Last row: j=5 (j = n-1)

Smoothing For every grid cell u[i,j], set it to average of itself and neighbors Implementation concerns: A. looping order B. boundary cases C. both D. none