Modeling, Simulating and Rendering Fluids. Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan

Similar documents
Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

Fluid Animation. Christopher Batty November 17, 2011

Dan s Morris s Notes on Stable Fluids (Jos Stam, SIGGRAPH 1999)

An Overview of Fluid Animation. Christopher Batty March 11, 2014

PDE Solvers for Fluid Flow

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Soft Bodies. Good approximation for hard ones. approximation breaks when objects break, or deform. Generalization: soft (deformable) bodies

( ) Notes. Fluid mechanics. Inviscid Euler model. Lagrangian viewpoint. " = " x,t,#, #

Physically Based Simulations (on the GPU)

Pressure corrected SPH for fluid animation

Chapter 5. The Differential Forms of the Fundamental Laws

fluid mechanics as a prominent discipline of application for numerical

Fluid Mechanics Prof. T.I. Eldho Department of Civil Engineering Indian Institute of Technology, Bombay. Lecture - 17 Laminar and Turbulent flows

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

X i t react. ~min i max i. R ij smallest. X j. Physical processes by characteristic timescale. largest. t diff ~ L2 D. t sound. ~ L a. t flow.

Physics-Based Animation

Open boundary conditions in numerical simulations of unsteady incompressible flow

An Introduction to Theories of Turbulence. James Glimm Stony Brook University

Continuum Mechanics Lecture 5 Ideal fluids

V (r,t) = i ˆ u( x, y,z,t) + ˆ j v( x, y,z,t) + k ˆ w( x, y, z,t)

2 Equations of Motion

Numerical methods for the Navier- Stokes equations

Additive Manufacturing Module 8

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

Hamiltonian aspects of fluid dynamics

Week 6 Notes, Math 865, Tanveer

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

3. FORMS OF GOVERNING EQUATIONS IN CFD

1. INTRODUCTION TO CFD SPRING 2018

Vortex stretching in incompressible and compressible fluids

Topics in Fluid Dynamics: Classical physics and recent mathematics

Fluid Dynamics Exercises and questions for the course

Introduction to Heat and Mass Transfer. Week 9

Conservation of Mass. Computational Fluid Dynamics. The Equations Governing Fluid Motion

1. INTRODUCTION TO CFD SPRING 2019

Smoothed Particle Hydrodynamics (SPH) Huamin Wang

OpenFOAM selected solver

Computational Astrophysics

Vorticity and Dynamics

Probability density function (PDF) methods 1,2 belong to the broader family of statistical approaches

Partial Differential Equations

The Shallow Water Equations

Notes. Multi-Dimensional Plasticity. Yielding. Multi-Dimensional Yield criteria. (so rest state includes plastic strain): #=#(!

Calculating equation coefficients

1. Introduction, tensors, kinematics

Numerical Heat and Mass Transfer

Getting started: CFD notation

MAE 3130: Fluid Mechanics Lecture 7: Differential Analysis/Part 1 Spring Dr. Jason Roney Mechanical and Aerospace Engineering

Turbulence Modeling I!

Particle-based Fluids

Fluid Dynamics: Theory, Computation, and Numerical Simulation Second Edition

Quick Recapitulation of Fluid Mechanics

CHAPTER 4. Basics of Fluid Dynamics

Introduction to Turbulence AEEM Why study turbulent flows?

CONVECTIVE HEAT TRANSFER

Differential relations for fluid flow

5.1 Fluid momentum equation Hydrostatics Archimedes theorem The vorticity equation... 42

Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom. Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom

7 The Navier-Stokes Equations

Chapter 9: Differential Analysis

Several forms of the equations of motion

Improvement of Calculation Stability for Slow Fluid Flow Analysis Using Particle Method *

CHAPTER 2 INVISCID FLOW

Chapter 2: Fluid Dynamics Review

Discrete Projection Methods for Incompressible Fluid Flow Problems and Application to a Fluid-Structure Interaction

Study of Forced and Free convection in Lid driven cavity problem

Streamline calculations. Lecture note 2

Navier-Stokes Equation: Principle of Conservation of Momentum

F11AE1 1. C = ρν r r. r u z r

Turbulence. 2. Reynolds number is an indicator for turbulence in a fluid stream

Lecture 2: Reconstruction and decomposition of vector fields on the sphere with applications

The Generalized Interpolation Material Point Method

Level Set and Phase Field Methods: Application to Moving Interfaces and Two-Phase Fluid Flows

In this section, mathematical description of the motion of fluid elements moving in a flow field is

Chapter 9: Differential Analysis of Fluid Flow

Fundamentals of Fluid Dynamics: Ideal Flow Theory & Basic Aerodynamics

Lecture 1: Introduction to Linear and Non-Linear Waves

Chapter 9 Implicit integration, incompressible flows

Detailed 3D modelling of mass transfer processes in two phase flows with dynamic interfaces

Burgers equation - a first look at fluid mechanics and non-linear partial differential equations

Treecodes for Cosmology Thomas Quinn University of Washington N-Body Shop

Formulation and performance of the Variable-Cubic Atmospheric Model

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

3.5 Vorticity Equation

Fundamentals Physics

Lecture 3: 1. Lecture 3.

AN UNCERTAINTY ESTIMATION EXAMPLE FOR BACKWARD FACING STEP CFD SIMULATION. Abstract

AE/ME 339. Computational Fluid Dynamics (CFD) K. M. Isaac. Momentum equation. Computational Fluid Dynamics (AE/ME 339) MAEEM Dept.

Finite volume method for CFD

New variables in spherical geometry. David G. Dritschel. Mathematical Institute University of St Andrews.

A PRACTICALLY UNCONDITIONALLY GRADIENT STABLE SCHEME FOR THE N-COMPONENT CAHN HILLIARD SYSTEM

Relativistic Hydrodynamics L3&4/SS14/ZAH

(1:1) 1. The gauge formulation of the Navier-Stokes equation We start with the incompressible Navier-Stokes equation 8 >< >: u t +(u r)u + rp = 1 Re 4

AE/ME 339. K. M. Isaac Professor of Aerospace Engineering. 12/21/01 topic7_ns_equations 1

Gauge finite element method for incompressible flows

Review of fluid dynamics

5. FVM discretization and Solution Procedure

Implementation of 3D Incompressible N-S Equations. Mikhail Sekachev

COURSE NUMBER: ME 321 Fluid Mechanics I 3 credit hour. Basic Equations in fluid Dynamics

A High-Order Galerkin Solver for the Poisson Problem on the Surface of the Cubed Sphere

Transcription:

Modeling, Simulating and Rendering Fluids Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan

Applications Mostly Hollywood Shrek Antz Terminator 3 Many others Games Engineering

Animating Fluids is Hard Too complex to animate by hand Surface is changing very quickly Lots of small details Need automatic simulations

Ad-Hoc Methods Some simple algorithms exist for special cases Mostly waves What about water glass? Too much work to come up with empirical algorithms for each case

Physically-Based Approach Borrow techniques from Fluid Dynamics Long history. Goes back to Newton Equations that describe fluid motion Use numerical methods to approximate fluid equations, simulating fluid motion Like mass-spring systems

What do we mean by Fluid? liquids or gases Mathematically: A vector field u (represents the fluid velocity) A scalar field p (represents the fluid pressure) fluid density (d) and fluid viscosity (v)

Vector Fields 2D Scalar function: f(x,y) = z z is a scalar value 2D Vector function: u(x,y) = v v is a vector value v = (x, y ) The set of values u(x,y) = v is called a vector field

Fluid Velocity == Vector Field Can model a fluid as a vector field u(x,y) u is the velocity of the fluid at (x,y) Velocity is different at each point in fluid! Need to compute change in vector field

Particles carry Velocities Particle Simulation: Track particle positions x = (x,y) Numerically Integrate: change in position dx dt Fluid Simulation : Track fluid velocities u = (u,v) at all points x in some fluid volume D Numerically Integrate: change in velocity du dt

Some Math Del Operator: Laplacian Operator: Gradient:

More Math Vector Gradient: Divergence: Directional Derivative:

Navier-Stokes Fluid Dynamics Velocity field u, Pressure field p Viscosity v, density d (constants) External force f Navier-Stokes Equation: Mass Conservation Condition:

Navier-Stokes Equation Derived from momentum conservation condition 4 Components: Advection/Convection Diffusion (damping) Pressure External force (gravity, etc)

Mass Conservation Condition Velocity field u has zero divergence Net mass change of any sub-region is 0 Flow in == flow out Incompressible fluid Comes from continuum assumption

Change in Velocity Derivative of velocity with respect to time Change in velocity, or acceleration So this equation models acceleration of fluids

Advection Term Change in Velocity Advection term Force exerted on a particle of fluid by the other particles of fluid surrounding it How the fluid pushes itself around

Diffusion Term Change in Velocity Advection Viscosity constant controls velocity diffusion Essentially, this term describes how fluid motion is damped Highly viscous fluids stick together Like maple syrup Low-viscosity fluids flow freely Gases have low viscosity

Weather: Advection & Diffusion Jet-Stream

Pressure Term Change in Velocity Advection Diffusion Pressure follows a diffusion process Fluid moves from high-pressure areas to low-pressure areas p = 0 p = 1 Moving == velocity So fluid moves in direction of largest change in pressure This direction is the gradient p = 0.5 Time

Weather: Pressure Fronts are the boundaries between regions of air with different pressure High Pressure Zones will diffuse into Low Pressure Zones

Body Force Change in Velocity Advection Diffusion Pressure Body force term represents external forces that act on the fluid Gravity Wind Etc

Summary Change in Velocity Advection Diffusion Pressure Add mass conservation (1 liter in == 1 liter out) constraint: Need to simulate these equations

Incompressible Euler Equations self-advection forces incompressible (Navier-Stokes without viscosity)

Additional Equations smoke s density temperature

Discretization v u

Algorithm add forces self-advect project t = 0 t = t + dt

Step 1 Add Force Assume change in force is small during timestep Just do a basic forward-euler step Note: f is actually an acceleration?

Step 2 - Advection

Method of Characteristics p is called the characteristic Partial streamline of velocity field u Can show u does not vary along streamline Determine p by tracing backwards Unconditionally stable Maximum value of w 2 is never greater than maximum value of w 1

Self-Advection t t+dt Semi-Lagrangian solver (Courant, Issacson & Rees 1952)

Self-Advection For each u-component

Self-Advection Trace backward through the field

Self-Advection Interpolate from neighbors

Self-Advection Set interpolated value in new grid

Self-Advection Repeat for all u-nodes

Self-Advection Similar for v-nodes

Self-Advection Vmax > Vmax Advected velocity field

Enforcing Zero Divergence Pressure and Velocity fields related Say we have velocity field w with non-zero divergence Can decompose into Helmholtz-Hodge Decomposition u has zero divergence Define operator P that takes w to u: Apply P to Navier-Stokes Equation: (Used facts that and )

Operator P Need to find Implicit definition: Poisson equation for scalar field p Neumann boundary condition Sparse linear system when discretized

Adding Viscosity Diffusion Standard diffusion equation Use implicit method: Sparse linear system

Step 4 - Projection Enforces mass-conservation condition Poisson Problem: Discretize q using central differences Sparse linear system Maybe banded diagonal Relaxation methods too inaccurate Method of characteristics more precise for divergence-free field

Solving the System Need to calculate: Start with initial state Calculate new velocity fields New state:

Vorticity Confinement Basic idea: Add energy lost as an external force. Avoid very quick dissipation. Vorticity Confinement force preserves swirling nature of fluids.

Vorticity Confinement

Vorticity Confinement

Vorticity Confinement

Videos