Physics-Based Animation

Similar documents
Fluid Animation. Christopher Batty November 17, 2011

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

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

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

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

PDE Solvers for Fluid Flow

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

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

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

Fluid Dynamics. Part 2. Massimo Ricotti. University of Maryland. Fluid Dynamics p.1/17

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

Pressure corrected SPH for fluid animation

SOE3213/4: CFD Lecture 1

Semi-Lagrangian Formulations for Linear Advection Equations and Applications to Kinetic Equations

2 Equations of Motion

Smoothed Particle Hydrodynamics (SPH) Huamin Wang

Partial Differential Equations II

5. FVM discretization and Solution Procedure

A unifying model for fluid flow and elastic solid deformation: a novel approach for fluid-structure interaction and wave propagation

What make cloth hard to simulate?

Earth System Modeling Domain decomposition

Conservation of mass. Continuum Mechanics. Conservation of Momentum. Cauchy s Fundamental Postulate. # f body

Particle-based Fluids

Block-Structured Adaptive Mesh Refinement

CSCI1950V Project 4 : Smoothed Particle Hydrodynamics

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

Ideas from Vector Calculus Kurt Bryan

Procedural Animation. D.A. Forsyth

Lecture 41: Highlights

Lecture 3: 1. Lecture 3.

Numerical Simulations. Duncan Christie

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

A Hybrid Method for the Wave Equation. beilina

Effect of Initial Geometry on Surface Flatness after Arc Welding Analyzed with MPS Method

The Advanced Research WRF (ARW) Dynamics Solver

The Generalized Interpolation Material Point Method

Particle Systems. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2017

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.

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Assignment 13 Assigned Mon Oct 4

Eulerian models. 2.1 Basic equations

The Relationship between Discrete Calculus Methods and other Mimetic Approaches

CHAPTER 4. Basics of Fluid Dynamics

x j r i V i,j+1/2 r Ci,j Ui+1/2,j U i-1/2,j Vi,j-1/2

Physics 218 Lecture 12

Numerical methods for the Navier- Stokes equations

The behaviour of high Reynolds flows in a driven cavity

Control Systems I. Lecture 4: Diagonalization, Modal Analysis, Intro to Feedback. Readings: Emilio Frazzoli

softened probabilistic

Electromagnetism Physics 15b

MECH 5810 Module 3: Conservation of Linear Momentum

Introduction to Fluid Dynamics

A semi-implicit non-hydrostatic covariant dynamical kernel using spectral representation in the horizontal and a height based vertical coordinate

CS 542G: The Poisson Problem, Finite Differences

Divergence Formulation of Source Term

Constitutive models. Constitutive model: determines P in terms of deformation

High Order Semi-Lagrangian WENO scheme for Vlasov Equations

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

Prof. Simon Tett, Chair of Earth System Dynamics & Modelling: The University of Edinburgh

DEFORMATION AND FRACTURE ANALYSIS OF ELASTIC SOLIDS BASED ON A PARTICLE METHOD

fluid mechanics as a prominent discipline of application for numerical

Tentative Physics 1 Standards

A symmetric positive definite formulation for monolithic fluid structure interaction

2. FLUID-FLOW EQUATIONS SPRING 2019

Cosmic Structure Formation on Supercomputers (and laptops)

Lecture 1: Introduction to Linear and Non-Linear Waves

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

Open boundary conditions in numerical simulations of unsteady incompressible flow

MATH 280 Multivariate Calculus Fall Integrating a vector field over a surface

(Refer Slide Time: 03: 09)

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

SPH for the Modeling of non-newtonian Fluids with Thermal-Dependent Rheology

ASTR 320: Solutions to Problem Set 2

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

FVM for Fluid-Structure Interaction with Large Structural Displacements

Semi-implicit methods, nonlinear balance, and regularized equations

Chapter 6: The Definite Integral

Split explicit methods

Computational Astrophysics

.u= 0 ρ( u t +(u. )u)= ρ g p+.[µ( u+ t u)]

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 15 - Tues 20th Nov 2018 First and Higher Order Differential Equations

4.1 LAWS OF MECHANICS - Review

Announcements. CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis. Today. Mathematical induction. Dan Grossman Spring 2010

ESCI 485 Air/Sea Interaction Lesson 1 Stresses and Fluxes Dr. DeCaria

Formulation and performance of the Variable-Cubic Atmospheric Model

ρ x + fv f 'w + F x ρ y fu + F y Fundamental Equation in z coordinate p = ρrt or pα = RT Du uv tanφ Dv Dt + u2 tanφ + vw a a = 1 p Dw Dt u2 + v 2

Volume in n Dimensions

Traffic Flow I. Kurt Bryan

The Distribution Function

Smoothed Particle Hydrodynamics (SPH) 4. May 2012

Scientific Computing I

Continuous Gradient Method to Cell Crossing Instability

pifreeze A Freeze / Thaw Plug-in for FEFLOW User Guide

1. INTRODUCTION TO CFD SPRING 2019

Chapter 2 The Continuum Equations

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

MITOCW watch?v=6hewlsfqlty

Time scales. Notes. Mixed Implicit/Explicit. Newmark Methods [ ] [ ] "!t = O 1 %

Partitioned Methods for Multifield Problems

Mathematical Concepts & Notation

Transcription:

CSCI 5980/8980: Special Topics in Computer Science Physics-Based Animation 13 Fluid simulation with grids October 20, 2015

Today Presentation schedule Fluid simulation with grids Course feedback survey (again)

(Tentative) presentation schedule Oct Nov Dec Tue Thu 20 Fluids on grids Liquid surfaces 22 27 Elasticity Finite element method 29 3 Sound (Bryan) Cloth and hair 5 10 Cloth (Alex & Morgan) Fluids (Ran & Jingying) 12 17 Fire (Devin & Lei) TBD 19 24 Solids (George & Jie) Thanksgiving 26 1 Real-time stuff (Zahra) Real-time stuff (Dan & Matt) 3 8 Wrap-up day Project presentations 10 15 Project presentations

Course feedback survey

Representing continua

Particles (SPH) Values on moving particles Approximate continuous field by weighted averaging A(x) = X A i m i i W (x x i,h) Derivatives by differentiating weighting kernel

Grids Values on nodes of rectilinear grid Easy to interpolate using only 4 (in 2D) or 8 (in 3D) nearest values

Grids class Grid { int m, n, o; Vec3d origin; double dx; Type *values; Type get(int i, int j, int k);... };

Grids (finite differences) @c @x 11 c 21 c 11 x 0 1 1 c 02 c 12 c 22 c 01 c 11 c 21 c 00 c 10 c 20 @c @x 11 c 11 c 01 x 1 1 0 @c @x 11 c 21 c 01 2 x ½ 0 ½

Grids (finite differences) c 02 c 12 c 22 c 01 c 11 c 21 r 2 c 1 h 2 1 1 4 1 1 c 00 c 10 c 20

Meshes (FEM) Values on nodes of (not necessarily regular) mesh Evaluate derivatives on elements (triangles/ tetrahedra/etc.)

Fluids on grids

Grids vs. particles Particles Mass, velocity, pressure, etc. stored on particles Particles move with fluid Grids Velocity, pressure, etc. stored on grid cells Grid doesn t move

Advection Grid doesn t move, fluid flows through grid Lagrangian Dc Dt @c =0 but @t 6=0 Eulerian

Advection Dc Dt = @c @t + u rc Lagrangian derivative Change due to movement of fluid ( advection ) Eulerian derivative Proof: differentiate c(x(t), t) with respect to t

The fluid equations Du Dt = f ext rp + µr 2 u Du Dt = f ext 1 rp + r2 u @u @t + u ru = f ext 1 rp + r2 u

Operator splitting @u @t + u ru = f ext 1 rp + r2 u Lots of different terms, hard to integrate safely in one step Deal with one term at a time, ignoring all the others (e.g. IMEX)

u n Operator splitting Integrate @u @t + u ru =0 for time Δt Advection Integrate @u @t = 1 f ext for time Δt External forces Viscosity Integrate @u @t = µ r2 u for time Δt Pressure Integrate @u @t = 1 rp for time Δt u n+1

Advection

Advection Goal: Integrate c/ t + u c = 0 for time Δt Interpretation: c moves with speed u for time Δt Solution: To get the value of c n+1 at any point, figure out where it came from and take the value of c n from there

Advection Trace backwards through u and look up values c n u n c n+1 Semi-Lagrangian advection

Advection Input: initial grid c n, velocity field u n Output: final grid c n+1 For each grid cell x i Backtrace position, e.g. x back = x i u i Δt Set output c i n+1 = interpolate c n at x back To advect velocities, just use u n as the initial grid too.

Pressure

Pressure In SPH, density ρ was used for two things: 1. Normalizing for uneven particle distribution 2. Computing pressure forces With grids, we don t need to track ρ. But what about pressure? Treat it as a constraint force: ρ = const dρ/dt = 0

Incompressibility Flow Fixed surface n u Net flow ZZinto/out of region = u ˆn da ZZZ = r u dv [Divergence theorem] We want net flow to be 0 for all possible regions, so u = 0 everywhere

Pressure u new = u t rp r u new =0 Constraint: u new should be divergence-free, find the constraint response p that makes it so (analogous to computing λ so that Jv = 0) r 2 p = t r u Ignore the /Δt (just a rescaling)

Staggered grids Store pressure at cell centers, but velocity at cell faces (r u) i,j u i+1,j u i,j x Finite differences line up u and p at cell centers Components of p and u at cell faces + v i,j+1 v i,j x p p i,j+1 p v u i,j v i,j+1 u i+1,j p i 1,j p i,j p i+1,j v u u v i,j u u v v p p i,j 1 p

Boundary conditions Solid obstacles: u n = 0 Fluid cannot flow into or out of obstacles Free surface: p = 0 p = 0 Air applies negligible force on water

Pressure solve 2 p = u Build a big linear system Ap = b and solve it Rows of A contain stencil for 2 (except at boundaries, be careful!) b contains values of u Then update u u p

The other bits External forces e.g. f = β(t T 0 )g Gravity, buoyancy, user interaction, Explicit integration is fine Viscosity Often ignored because numerical damping is enough For really thick fluids, use implicit integration

u n Operator splitting Integrate @u @t + u ru =0 for time Δt Advection Integrate @u @t = 1 f ext for time Δt External forces Viscosity Integrate @u @t = µ r2 u for time Δt Pressure Integrate @u @t = 1 rp for time Δt u n+1

Further reading Bridson and Müller-Fischer, Fluid Simulation for Computer Animation (SIGGRAPH 2007 course notes) Bridson, Fluid Simulation for Computer Graphics (2008 book)

Course feedback survey

Next class Even more fluids Hybrid (particles + grid) techniques for advection Liquid surface reconstruction