Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Similar documents
CS-184: Computer Graphics Lecture #21: Fluid Simulation II

CGT 581 G Fluids. Overview. Some terms. Some terms

CS 231. Fluid simulation

Animation of Fluids. Animating Fluid is Hard

Navier-Stokes & Flow Simulation

Navier-Stokes & Flow Simulation

Navier-Stokes & Flow Simulation

Overview of Traditional Surface Tracking Methods

Divergence-Free Smoothed Particle Hydrodynamics

Realistic Animation of Fluids

Realistic Animation of Fluids

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

Fluids in Games. Jim Van Verth Insomniac Games

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs)

Smoke Simulation using Smoothed Particle Hydrodynamics (SPH) Shruti Jain MSc Computer Animation and Visual Eects Bournemouth University

Particle-Based Fluid Simulation. CSE169: Computer Animation Steve Rotenberg UCSD, Spring 2016

CNM 190, pt 2 Advanced Digital Animation Lec 03 : Art Direction on Madagascar / Effects 1

PHYSICALLY BASED ANIMATION

AN ADAPTIVE SAMPLING APPROACH TO INCOMPRESSIBLE PARTICLE-BASED FLUID. A Dissertation WOO-SUCK HONG

FLUID SIMULATION. Kristofer Schlachter

Computer animation for fluid simulation of a high viscous fluid melting

Lagrangian methods and Smoothed Particle Hydrodynamics (SPH) Computation in Astrophysics Seminar (Spring 2006) L. J. Dursi

Particle-based Fluid Simulation

Partial Differential Equations

Comparison between incompressible SPH solvers

Fluid Simulation. Dhruv Kore, Giancarlo Gonzalez, and Jenny Sum CS 488: Introduction to Computer Graphics Professor Angus Forbes

Fluid Solver built in Houdini

(LSS Erlangen, Simon Bogner, Ulrich Rüde, Thomas Pohl, Nils Thürey in collaboration with many more

Solidification using Smoothed Particle Hydrodynamics

Hardware Accelerated Real-Time Fluid Surface Simulation

Permeable and Absorbent Materials in Fluid Simulations

T6: Position-Based Simulation Methods in Computer Graphics. Jan Bender Miles Macklin Matthias Müller

Simulation of Swirling Bubbly Water using Bubble Particles

A Particle Cellular Automata Model for Fluid Simulations

NVIDIA. Interacting with Particle Simulation in Maya using CUDA & Maximus. Wil Braithwaite NVIDIA Applied Engineering Digital Film

Support for Multi physics in Chrono

An Adaptive Sampling Approach to Incompressible Particle-Based Fluid

Adaptive Particles for Incompressible Fluid Simulation (Technical Report tamu-cs-tr )

Level set methods Formulation of Interface Propagation Boundary Value PDE Initial Value PDE Motion in an externally generated velocity field

Continued Investigation of Small-Scale Air-Sea Coupled Dynamics Using CBLAST Data

Introduction to Computer Graphics. Animation (2) May 26, 2016 Kenshi Takayama

Module 4: Fluid Dynamics Lecture 9: Lagrangian and Eulerian approaches; Euler's acceleration formula. Fluid Dynamics: description of fluid-motion


Chapter 1 - Basic Equations

Acknowledgements. Prof. Dan Negrut Prof. Darryl Thelen Prof. Michael Zinn. SBEL Colleagues: Hammad Mazar, Toby Heyn, Manoj Kumar

Water. Notes. Free surface. Boundary conditions. This week: extend our 3D flow solver to full 3D water We need to add two things:

Interactive Fluid Simulation using Augmented Reality Interface

Fluid Simulation Quality with Violated CFL Condition

A High Quality, Eulerian 3D Fluid Solver in C++ A Senior Project. presented to. the Faculty of the Computer Science Department of

An introduction to Partial Differential Equations. Computer Graphics CMU /15-662, Fall 2016

Eulerian Fluid Simulator

More Animation Techniques

A Novel Approach to High Speed Collision

IMPROVED WALL BOUNDARY CONDITIONS WITH IMPLICITLY DEFINED WALLS FOR PARTICLE BASED FLUID SIMULATION

Shape of Things to Come: Next-Gen Physics Deep Dive

CUDA. Fluid simulation Lattice Boltzmann Models Cellular Automata

Dynamical Simulation 1: Particle Systems and ODEs

Investigating The Stability of The Balance-force Continuum Surface Force Model of Surface Tension In Interfacial Flow

3D Simulation of Dam-break effect on a Solid Wall using Smoothed Particle Hydrodynamic

1.2 Numerical Solutions of Flow Problems

Constraint fluids in Sprinkle. Dennis Gustafsson Mediocre

Topics in Computer Animation

Interactive Fluid Simulation Using Augmented Reality Interface

Chapter 3: Computer Animation Reminder: Descriptive animation. Procedural animation : Examples. Towards methods that generate motion?

Solution for Euler Equations Lagrangian and Eulerian Descriptions

The Simulation of Liquids

1 Mathematical Concepts

MAE 3130: Fluid Mechanics Lecture 5: Fluid Kinematics Spring Dr. Jason Roney Mechanical and Aerospace Engineering

Using a Single Rotating Reference Frame

Simple and Fast Fluids

Free Surface Flow Simulations

Cloth Simulation. COMP 768 Presentation Zhen Wei

Modeling and simulation the incompressible flow through pipelines 3D solution for the Navier-Stokes equations

Solution for Euler Equations Lagrangian and Eulerian Descriptions

Structure and Synthesis of Robot Motion

Divergence-Free Smoothed Particle Hydrodynamics

Particle Systems. Lecture 8 Taku Komura

Texture Advection Based Simulation of Dynamic Cloud Scene

Preliminary Spray Cooling Simulations Using a Full-Cone Water Spray

Three Dimensional Numerical Simulation of Turbulent Flow Over Spillways

Parallel GPU-Based Fluid Animation. Master s thesis in Interaction Design and Technologies JAKOB SVENSSON

Overview. Applications of DEC: Fluid Mechanics and Meshing. Fluid Models (I) Part I. Computational Fluids with DEC. Fluid Models (II) Fluid Models (I)

CMPT 898 Final Report. Adam L. Preuss. Numerical Simulation Laboratory. Department of Computer Science. University of Saskatchewan

CS205b/CME306. Lecture 9

Technical Report TR

NUMERICAL VISCOSITY. Convergent Science White Paper. COPYRIGHT 2017 CONVERGENT SCIENCE. All rights reserved.

Flow and Heat Transfer in a Mixing Elbow

Characteristic Aspects of SPH Solutions

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

Abstract. Introduction. Kevin Todisco

FEMLAB Exercise 1 for ChE366

Chapter 2 Water and Bubbles

SPC 307 Aerodynamics. Lecture 1. February 10, 2018

Surface Tension Approximation in Semi-Lagrangian Level Set Based Fluid Simulations for Computer Graphics

Volcanic Smoke Animation using CML

Example 13 - Shock Tube

The viscous forces on the cylinder are proportional to the gradient of the velocity field at the

REVIEWS ON PHYSICALLY BASED CONTROLLABLE FLUID ANIMATION

Transcription:

Fluid Simulation [Thürey 10] [Pfaff 10] [Chentanez 11] 1

Computational Fluid Dynamics 3

Graphics Why don t we just take existing models from CFD for Computer Graphics applications? 4

Graphics Why don t we just take existing models from CFD for Computer Graphics applications? Accuracy Performance Where s my water? Disney 5

Graphics Why don t we just take existing models from CFD for Computer Graphics applications? Visual result Control 6

Graphics Why don t we just take existing models from CFD for Computer Graphics applications? It s a common misconception that visual effects are about simulating reality. They re not. Reality is boring. Visual effects are about simulating something dramatic, - Jonathan Cohen, Rhythm&Hues 7

Films The Abyss, 89 Fluid effects were animated manually, e.g. digitally painting

Films Antz, 98 First film with fluid simulation -> very time consuming

Films Pirates of the Caribbean 3, 07 Control was key: manipulate physics to meet creative goals

Films The Day After Tomorrow, 04 Foam, mist, more animator control

Controlling fluid sims is an active area of research 12

Fluids in production We used a variety of tools and tricks to control the simulated water

Fluids in production Scanline Scanline VFX: 2012

Fluids in games Real-time, stability Dimension reduction

Fluids in games Real-time, stability Dimension reduction Portal 2 16

Films vs Video Games Offline Stanford Lighthouse Real-time NVIDIA Lighthouse [Losasso 08] [Chentanez 11] 17

Spatial Discretization Langrangian viewpoint Eulerian viewpoint - Particles represent the fluid, carry quantities - Fluid motion by moving particles - Fixed spatial locations - Measure quantities as it flows past You are in the balloon floating along with the wind, measuring the pressure, temperature, humidity etc of the air that s flowing alongside you doing a weather report You are stuck on the ground, measuring the pressure, temperature, humidity etc of the air that s flowing past

Notation Reminder Nabla operator: - Gradient (scalar -> vector): - Divergence (vector -> scalar): Laplace operator (scalar->scalar): 20

Visual Vector Calculus 21

Navier-Stokes Equations 2 differential equations describing velocity field over time Conservation of momentum: F=ma Conservation of mass: u = velocity p = pressure = density g = gravity = viscosity 22

Derivation of Momentum Equation Imagine single blob of fluid p: m = mass V = volume u = velocity Start with Newton s second law: Rewrite as: 23

What Forces Act on p? Gravity: Pressure: - Consider nearby fluid - Force: negative gradient -> towards largest pressure decrease / low pressure areas Compute with: 24

What Forces Act on p? (2) Viscosity - Internal friction - More accurately: diffusion of (relative) velocities Diffusion - Laplacian - Strength: dynamic viscosity coefficient - Compute with: 25

Viscous Material Losasso et al., Multiple Interacting Liquids, Siggraph 06 26

What Forces Act on p? (2) Viscosity - Internal friction - More accurately: diffusion of velocities Diffusion - Laplacian - Strength: dynamic viscosity coefficient - Compute with: Note: Particle systems always need viscosity to stabilize system 27

Total Forces on p (1) Newton s 2nd law (2) (3) Forces so far. (4) Divide by mass (5) Rearrange, using kinematic viscosity 28

Material Derivative We have fluid moving in a velocity field u, possessing some scalar quantity q(t,x) Change of a quantity q(t,x) during motion: total derivative of q with respect to time expanded through multivariate chain rule 1 2 use grad, velocity material derivative how fast q is changing at fixed point in space x (temperature is decreasing because of cooling-down) correcting for how much of that change is due just to differences in the fluid flowing past (inflow / outflow at x) (temperature is changing because hot air is being replaced by cold air) 29

Navier-Stokes Equations how fast q is changing at fixed point in space x (temperature is decreasing because of cooling-down) inflow / outflow at x 1 (temperature is changing because hot air is being replaced by cold air) 2 Momentum equation: Note: This term not needed for particle-based fluids Mass conservation equation: 30

Mass Conservation Incompressibility Very small volume change in water: 10m: 200kPa 0.0045% 4000m: 40 000kPa 1.8% Small effect on how fluids move at macroscopic level Water is treated as incompressible 33

Mass Conservation Divergence-free: what goes in somewhere, must go out somewhere else -7 Per unit volume: +1 +2 +4 34

Spatial Discretization: gridbased methods Grid discretization - Cubical cells - Pressure and velocity defined at center p(i,j) u(i,j) 38

Spatial Discretization: gridbased methods Staggered grid (MAC grid) - Cubical cells - Pressure defined at center - Velocity components defined on faces of cells u(i-1/2,j) v(i,j+1/2) p(i,j) v(i,j-1/2) u(i+1/2,j) + Staggering more stable, second order accurate - Evaluate velocity at any point through interpolation 39

Spatial Discretization: gridbased methods How do we evaluate gradient, divergence, laplacians, etc on a grid? p(i,j) u(i,j) Finite difference method (FDM) 40

41 Example: Grid Laplacian ), ( ), ( ), ( 2 2 2 2 y x u y y x u x y x u Discretizing on a grid with cell size h: 2, 1, 1, 1, 1,, 4 h u u u u u u j i j i j i j i j i j i

Computation Order Advection Body Force Diffusion Pressure Solve Requires systems of linear equations to be solved at every time step 42

Further Reading Bridson et al., Fluid Simulation Course, Siggraph Course Notes 2006/2007 http://www.cs.ubc.ca/~rbridson/fluidsimulation/ Cline et al., Fluid Flow for the Rest of Us: Tutorial of the Marker and Cell Method in Computer Graphics http://people.sc.fsu.edu/~jburkardt/pdf/fluid_flow_for_t he_rest_of_us.pdf 43

Spatial Discretization: particlebased methods Smoothed Particle Hydrodynamics (SPH) 72

Particle Fluids

Resolution - 40K vs 4M

30M - Opaque Surface

Simple Particle System Without particle-particle interaction - Simple and fast - Fuzzy objects like fire, clouds, smoke Particles generated by emitters, deleted when lifetime is exceeded Forces -> velocities -> positions v i x i m i f i emitter -> Smoothed Particle Hydrodynamics (SPH): With particleparticle interaction based on NS eqs

SPH Simulations in Films Lord of the Rings 3 Superman Returns

SPH Simulations in Games Alice: Madness Returns Portal 2 Epic Mickey 81

Spatial Discretization Langrangian viewpoint Eulerian viewpoint - Particles represent the fluid, carry quantities - Fluid motion by moving particles - Fixed spatial locations - Measure quantities as it flows past 84

Spatial Discretization Langrangian viewpoint Eulerian viewpoint Pros and Cons Neighbor search Advection Splashes, droplets Smooth surfaces Parameters

Particles - Observations Advection Body Force Diffusion No advection needed Viscosity always needed Pressure Solve One linear equation / particle Neighborhood size 30-40, dynamically changing! Many SPH solvers do not explicitly enforce incompressibility 89

NS in the Lagrangian Viewpoint // a=f/m // Multiply by density // rho*a=f/v Force densities f (F/V) SPH Literature in Graphics: - [Müller03] Particle-Based Fluid Simulation for Interactive Applications - [Bridson / Müller07] Fluid Simulation Course Notes, Siggraph 2007 - [Ihmsen13] State of the art report, SPH Fluids in Computer Graphics 90

Computation Order Neighbor Search Density, Pressure Body Force / V Diffusion / V Pressure Force / V Computed all at once 91

Required reading for next class Smoothed Particle Hydrodynamics Particle-Based Fluid Simulation for Interactive Applications, Muller et al., 2003 Position-based Fluids Position Based Fluids, Macklin & Muller, 2014 92

Reminder Project Ideas Send me brief description by next Tuesday (1 para) Team info, topic, etc. 93