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.

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.
Realistic Simulation and Rendering of Smoke CSE Class Project Presentation Oleksiy Busaryev TexPoint fonts used in EMF. Read the TexPoint manual.
Christopher Batty and Robert Bridson University of British Columbia
Active Contours, Level Sets, and Image Segmentation
Dynamic model of a drop shot from an inkjet printer.
Continuity Equation. Continuity Equation Continuity Equation Net outflow in x direction.
Matthias Müller, Barbara Solenthaler, Richard Keiser, Markus Gross Eurographics/ACM SIGGRAPH Symposium on Computer Animation (2005),
Self-propelled motion of a fluid droplet under chemical reaction Shunsuke Yabunaka 1, Takao Ohta 1, Natsuhiko Yoshinaga 2 1)Department of physics, Kyoto.
The University of North Carolina – Chapel Hill COMP Finite Elements A Theory-lite Intro Jeremy Wendt April 2005.
1 Modeling Highly- Deformable Liquid Chih-Wei Chiu Computer Graphics and Geometry Modeling Laboratory National Chiao Tung University June 25, 2002 Advisors:
Introduction to numerical simulation of fluid flows
More Accurate Pressure Solves. Solid Boundaries  Voxelized version works great if solids aligned with grid  If not: though the error in geometry is.
1cs533d-winter-2005 Notes  Please read Fedkiw, Stam, Jensen, “Visual simulation of smoke”, SIGGRAPH ‘01.
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.
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 6 FLUID KINETMATICS.
1cs533d-winter-2005 Notes  Please read Enright et al., “Animation and rendering of complex water surfaces”, SIGGRAPH’02.
1 MFGT 242: Flow Analysis Chapter 4: Governing Equations for Fluid Flow Professor Joe Greene CSU, CHICO.
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.
Modelling Realistic Water & Fire Sérgio Leal Socrates/Erasmus student at: AK Computer Graphics Institute for Computer Graphics and Vision Technical University.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Introduction to Modeling Fluid Dynamics 1.
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.
Simulation and Animation
Motivation  Movie  Game  Engineering Introduction  Ideally  Looks good  Fast simulation  Looks good?  Look plausible  Doesn’t need to be exactly.
Conservation Laws for Continua
Fluid Animation CSE 3541 Matt Boggus. Procedural approximations – Heightfield fluids Mathematical background – Navier-Stokes equation Computational models.
Deformable Models Segmentation methods until now (no knowledge of shape: Thresholding Edge based Region based Deformable models Knowledge of the shape.
A Hybrid Particle-Mesh Method for Viscous, Incompressible, Multiphase Flows Jie LIU, Seiichi KOSHIZUKA Yoshiaki OKA The University of Tokyo,
Animation of Fluids.
PTT 204/3 APPLIED FLUID MECHANICS SEM 2 (2012/2013)
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.
Lecture I of VI (Claudio Piani) Course philosophy, the Navier-Stokes equations, Shallow Water, pressure gradient force, material derivative, continuity,
1 Discretization of Fluid Models (Navier Stokes) Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal.
Lecture 6 : Level Set Method
A particle-gridless hybrid methods for incompressible flows
Prof. dr. A. Achterberg, Astronomical Dept., IMAPP, Radboud Universiteit.
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.
Introduction to Level Set Methods: Part II
FPGA Based Smoke Simulator Jonathan Chang Yun Fei Tianming Miao Guanduo Li.
FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.
Governing Equations Conservation of Mass Conservation of Momentum Velocity Stress tensor Force Pressure Surface normal Computation Flowsheet Grid values.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Perpetual Visualization of Particle Motion and Fluid Flow Presented by Tsui Mei Chang.
CP502 Advanced Fluid Mechanics
CP502 Advanced Fluid Mechanics
November 2005 Center for Computational Visualization Institute of Computational and Engineering Sciences Department of Computer Sciences University of.
Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques SIGGRAPH 2006 Geoffrey Irving Eran Guendelman Frank Losasso.
Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques Geoffrey Irving Stanford University Pixar Animation Studios.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Water Computational Fluid Dynamics Volumes Lagrangian vs. Eulerian modelling Navier-Stokes equations.
Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques Geoffrey Irving Stanford University Pixar Animation Studios.
Stable But Nondissipative Water OH-YOUNG SONG HYUNCHEOL SHIN HYEONG-SEOK KO.
Animating smoke with dynamic balance Jin-Kyung Hong Chang-Hun Kim 발표 윤종철.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Computational Fluid Dynamics.
Fluid Animation CSE 3541 By: Matt Boggus.
Christopher Crawford PHY
Numerical Modeling of Dynamics and Adhesion of Leukocytes
Introduction to Fluid Dynamics & Applications
topic16_cylinder_flow_relaxation
Topic9_Pressure_Correction
AE/ME 339 Computational Fluid Dynamics (CFD) K. M. Isaac 4/30/2019
Topic 8 Pressure Correction
David Marshburn Comp 259 April 17, 2002
Anthony D. Fick & Dr. Ali Borhan Governing Equations
Presentation transcript:

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. Davidhazy at RIT. Used without permission.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 2 Overview Understanding the Navier-Stokes equations ­ Derivation (following [Griebel 1998]) ­ Intuition Solving the Navier-Stokes equations ­ Basic approaches ­ Boundary conditions Tracking the free surface

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 3 Operators  - gradient div- divergence  2 - Laplacian …- Hand waving / Lengthy math compression Foundations

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 4 Transport Theorem

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 5 Conservation of Mass Transport theorem Integrand vanishes  is constant for incompressible fluids Continuity equation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 6 Conservation of Momentum

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 7 Conservation of Momentum Transport theoremDivergence theorem Momentum equation …

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 8 Navier-Stokes Equations convectionviscosity external forces pressure

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 9 Solving the equations Basic Approach 1.Create a tentative velocity field. a.Finite differences b.Semi-Lagrangian method (Stable Fluids [Stam 1999]) 2.Ensure that the velocity field is divergence free: a.Adjust pressure and update velocities b.Projection method

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 10 Tentative Velocity Field Finite differences – mechanical translation of equations.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 11 Tentative Velocity Field Limits on time step CFL conditions – don’t move more than a single cell in one time step Diffusion term

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 12 Tentative Velocity Field Stable Fluids Method 1.Add forces: 2.Advection 3.Diffusion

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 13 Tentative Velocity Field Advection Finite differences is unstable for large Δt. Solution: trace velocities back in time. Guarantees that the velocities will never blow up.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 14 Tentative Velocity Field Diffusion Discretizing the viscosity term spreads velocity among immediate neighbors. Unstable when time step too small, grid spacing too large, or viscosity is high. Solution: Instead of using an explicit time step use an implicit one. This leads to a large but sparse linear system.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 15 Satisfying the Continuity Eq. The tentative velocity field is not necessarily divergence free and thus does not satisfy the continuity equation. Three methods for satisfying the continuity equation: 1.Explicitly satisfy the continuity equation by iteratively adjusting the pressures and velocities in each cell. 2.Find a pressure correction term that will make the velocity field divergence free. 3.Project the velocities onto their divergence free part.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 16 Explicitly Enforcing  u=0 Since we have not yet added the pressure term, we can use pressure to ensure that the velocities are divergence free.  u>0  increased pressure and subsequent outflux  u<0  decreased pressure and subsequent influx Relaxation algorithm 1.Correct the pressure in a cell 2.Update velocities 3.Repeat for all cells until each has  u<ε

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 17 Solving for pressure Another approach involves solving for a pressure correction term over the whole field such that the velocities will be divergence free and then update the velocities at the end. Discretize in time Rearrange terms Satisfy continuity eq.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 18 Solving for pressure We end up with the Poisson equation for pressure. This is another sparse linear system. These types of equations can be solved using iterative methods. Use pressures to update final velocities.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 19 Projection Method The Helmholtz-Hodge Decomposition Theorem states that any vector field can be decomposed as: where u is divergence free and q is a scalar field defined implicitly as: We can define an operator P that projects a vector field onto its divergence free part:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 20 Projection Method Applying P to both sides of the momentum equation yields a single equation only in terms of u: Thus for the last step : Look familiar? The scalar field q is actually related to pressure!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 21 The Bottom Line All three methods are equivalent!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 22 Boundary Conditions No slip: Set velocity to 0 on the boundary. Good for obstacles. Free slip: Set only the velocity in the direction normal to the boundary to zero. Good for setting up a plane of symmetry. Inflow: Specified positive normal velocity. Good for sources. Outflow: Specified negative normal velocity. Good for sinks. Periodic: Copy the last row and column of cells to first row and column. Good for simulating an infinite domain.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 23 Staggered Grid The staggered grid provides velocities immediately at cell boundaries, is convenient for finite differences, and avoids oscillations. Consider problem of a 2D fluid at rest with no external forces. The continuous solution is: On a discretized non-staggered grid you can have:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 24 Tracking the Free Surface The movement of the free surface is not explicit in the Navier-Stokes equations. Three methods for tracking the free surface: 1.Marker and cell (MAC) method 2.Front tracking 3.Particle level set method

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 25 MAC Due to [Harlow and Welch 1965]. Track massless marker particles to determine where the free surface is located. Markers are transported according to the velocity field. Cells with markers are fluid cells. Fluid cells bordering empty cells are surface cells. There are boundary conditions that must be satisfied at the surface. Extended by [Chen et al. 1997] to track particles only near the surface.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 26 MAC Problems: Can lead to mass dissipation, especially with stable fluid style advection. No straight forward way to extract a smooth surface. Image from [Griebel 1998].

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 27 Front Tracking Proposed by [Foster and Fedkiw 2001] Front tracking uses a combination of a level set and particles to track the surface. The particles are used to define an implicit function. An isocontour of this function represents the liquid surface. The isocontour yields a smoother surface than particles alone.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 28 Front Tracking Using the level set method, the isocontour can be evolved directly over time by using the fluid velocities. Particles and level set evolution have complementary strengths and weaknesses ­ Level set evolution suffers volume loss ­ Particles can cause visual artifacts ­ Level sets are always smooth. ­ Particles retain details.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 29 Front Tracking Combine the two techniques by giving particles more weight in areas of high curvature. Particles escaping the level set are rendered directly as splashing droplets.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 30 Particle Level Set Method Presented by [Enright et al 2002]. Implicit surface loses detail on coarse grids. Particles keep the surface from crossing them but can’t keep it from drifting away. Add particles to both side of the implicit surface. Escaped particles indicate the location of errors in the implicit surface so it can be rebuilt.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 31 Particle Level Set Method Extrapolated velocities at the surface give more realistic motion.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 32 References CHEN, J., AND LOBO, N Toward interactive-rate simulation of fluids with moving obstacles using the navier-stokes equations. Computer Graphics and Image Processing, 107–116. CHEN, S., JOHNSON, D., RAAD, P. AND FADDA, D The surface marker and micro cell method. International Journal of Numerical Methods in Fluids, 25, FOSTER, N., AND METAXAS, D Realistic animation of liquids. Graphical Models and Image Processing, 471–483. FOSTER, N., AND FEDKIW, R Practical animation of liquids. In Proceedings of SIGGRAPH 2001, 23–30. GRIEBEL, M., DORNSEIFER, T., AND NEUNHOEFFER, T Numerical Simulation in Fluid Dynamics: A Practical Introduction. SIAM Monographs on Mathematical Modeling and Computation. SIAM KASS, M., AND MILLER, G Rapid, stable fluid dynamics for computer graphics. In Computer Graphics (Proceedings of SIGGRAPH 90), vol. 24, 49–57. O’BRIEN, J., AND HODGINS, J Dynamic simulation of splashing fluids. In Proceedings of Computer Animation 95, 198–205. STAM, J Stable fluids. In Proceedings of SIGGRAPH 99,