Fluid Dynamics and the Navier-Stokes Equation

Similar documents
1. Fluids Mechanics and Fluid Properties. 1.1 Objectives of this section. 1.2 Fluids

4 Microscopic dynamics

1 The basic equations of fluid dynamics

vector calculus 2 Learning outcomes

State of Stress at Point

CBE 6333, R. Levicky 1 Differential Balance Equations

Basic Principles in Microfluidics

Scalars, Vectors and Tensors

Introduction to COMSOL. The Navier-Stokes Equations

Governing Equations of Fluid Dynamics

Differentiation of vectors

Fluids and Solids: Fundamentals

CBE 6333, R. Levicky 1 Review of Fluid Mechanics Terminology

NUMERICAL ANALYSIS OF THE EFFECTS OF WIND ON BUILDING STRUCTURES

4.2. LINE INTEGRALS ; z = t. ; y = sin

ENV5056 Numerical Modeling of Flow and Contaminant Transport in Rivers. Equations. Asst. Prof. Dr. Orhan GÜNDÜZ

Fluid Mechanics: Static s Kinematics Dynamics Fluid

Differential Relations for Fluid Flow. Acceleration field of a fluid. The differential equation of mass conservation

ATM 316: Dynamic Meteorology I Final Review, December 2014

CFD Based Air Flow and Contamination Modeling of Subway Stations

Vector Spaces; the Space R n

Lecture 6 - Boundary Conditions. Applied Computational Fluid Dynamics

Lecture 07: Work and Kinetic Energy. Physics 2210 Fall Semester 2014

Lecture 16 - Free Surface Flows. Applied Computational Fluid Dynamics

Review of Vector Analysis in Cartesian Coordinates

Interactive simulation of an ash cloud of the volcano Grímsvötn

The Viscosity of Fluids

Real-Time Fluid Dynamics for Games. Jos Stam Research Alias wavefront

Chapter 28 Fluid Dynamics

FLUID MECHANICS FOR CIVIL ENGINEERS

CE 3500 Fluid Mechanics / Fall 2014 / City College of New York

Graphics. Computer Animation 고려대학교 컴퓨터 그래픽스 연구실. kucg.korea.ac.kr 1

Electrostatic Fields: Coulomb s Law & the Electric Field Intensity

F = 0. x ψ = y + z (1) y ψ = x + z (2) z ψ = x + y (3)

Pre-requisites

Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows

Basic Equations, Boundary Conditions and Dimensionless Parameters

Viscous flow in pipe

Physics of the Atmosphere I

INTRODUCTION TO FLUID MECHANICS

Fast Fluid Dynamics Simulation on the GPU

Notes on Polymer Rheology Outline

THEORETICAL MECHANICS

Modeling Mechanical Systems

EXAMPLE: Water Flow in a Pipe

CE 204 FLUID MECHANICS

APPLIED MATHEMATICS ADVANCED LEVEL

Buoyant Force and Archimedes Principle

FLUID FLOW STREAMLINE LAMINAR FLOW TURBULENT FLOW REYNOLDS NUMBER

The Navier Stokes Equations

Slide Basic system Models

CFD Application on Food Industry; Energy Saving on the Bread Oven

Figure 1.1 Vector A and Vector F

Lecture 5 Hemodynamics. Description of fluid flow. The equation of continuity

Mathematical Modeling and Engineering Problem Solving

VISUAL PHYSICS School of Physics University of Sydney Australia. Why do cars need different oils in hot and cold countries?

Introduction to Microfluidics. Date: 2013/04/26. Dr. Yi-Chung Tung. Outline

Unified Lecture # 4 Vectors

How To Understand The Dynamics Of A Multibody System

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS

ME6130 An introduction to CFD 1-1

Steady Flow: Laminar and Turbulent in an S-Bend

Chaotic Mixing in Extrusion-Based Melt Spinning of Fibers

Practice Final Math 122 Spring 12 Instructor: Jeff Lang

Hardware-Aware Analysis and. Presentation Date: Sep 15 th 2009 Chrissie C. Cui

LECTURE 2: Stress Conditions at a Fluid-fluid Interface

Dynamics. Basilio Bona. DAUIN-Politecnico di Torino. Basilio Bona (DAUIN-Politecnico di Torino) Dynamics / 30

MEL 807 Computational Heat Transfer (2-0-4) Dr. Prabal Talukdar Assistant Professor Department of Mechanical Engineering IIT Delhi

The Viscosity of Fluids

Lecture 11 Boundary Layers and Separation. Applied Computational Fluid Dynamics

Kinematics & Dynamics

Isaac Newton s ( ) Laws of Motion

Data Mining: Algorithms and Applications Matrix Math Review

THE UNIVERSITY OF TEXAS AT AUSTIN Department of Aerospace Engineering and Engineering Mechanics. EM 311M - DYNAMICS Spring 2012 SYLLABUS

FLUID MECHANICS IM0235 DIFFERENTIAL EQUATIONS - CB _1

VELOCITY, ACCELERATION, FORCE

Simulation of Cumuliform Clouds Based on Computational Fluid Dynamics

KINEMATICS OF PARTICLES RELATIVE MOTION WITH RESPECT TO TRANSLATING AXES

Appendix 4-C. Open Channel Theory

MEASUREMENT OF VISCOSITY OF LIQUIDS BY THE STOKE S METHOD

Chapter 7. Potential flow theory. 7.1 Basic concepts Velocity potential

Computational fluid dynamics (CFD) 9 th SIMLAB Course

du u U 0 U dy y b 0 b

Models of Cortical Maps II

XI / PHYSICS FLUIDS IN MOTION 11/PA

Solving Simultaneous Equations and Matrices

Rotation: Moment of Inertia and Torque

MATH ajajoo/math2433

CONSERVATION LAWS. See Figures 2 and 1.

Ch 2 Properties of Fluids - II. Ideal Fluids. Real Fluids. Viscosity (1) Viscosity (3) Viscosity (2)

arxiv:physics/ v1 [physics.ed-ph] 14 Apr 2000

Microfluidic Principles Part 1

The Vector or Cross Product

Chapter 2. Derivation of the Equations of Open Channel Flow. 2.1 General Considerations

When the fluid velocity is zero, called the hydrostatic condition, the pressure variation is due only to the weight of the fluid.

2.5 Physically-based Animation

Lecture PowerPoints. Chapter 7 Physics: Principles with Applications, 6 th edition Giancoli

1.Name the four types of motion that a fluid element can experience. YOUR ANSWER: Translation, linear deformation, rotation, angular deformation.

Distinguished Professor George Washington University. Graw Hill

Transcription:

Fluid Dynamics and the Navier-Stokes Equation CMSC498A: Spring 12 Semester By: Steven Dobek 5/17/2012

Introduction I began this project through a desire to simulate smoke and fire through the use of programming and graphics rendering. To do this, I researched the concepts of vector calculus, fluid dynamics, and the Navier-Stokes equation. Upon finding such useful and insightful information, the project evolved into a study of how the Navier-Stokes equation was derived and how it may be applied in the area of computer graphics. The Navier-Stokes equation is named after Claude-Louis Navier and George Gabriel Stokes. This equation provides a mathematical model of the motion of a fluid. It is an important equation in the study of fluid dynamics, and it uses many core aspects to vector calculus. Before explaining the Navier-Stokes equation it is important to cover several aspects of computational fluid dynamics. At the core of this is the notion of a vector field. A vector field is defined as a mapping from each point in 2- or 3-dimensional real space to a vector. Each such vector can be thought of as being composed of a directional unit vector and a scalar multiplier. In the context of fluid dynamics, the value of a vector field at a point can be used to indicate the velocity at that point. Vector fields are useful in the study of fluid dynamics, since they make it possible to discern the approximated path of a fluid at any given point [12]. Vector Calculus Vector calculus is the branch of mathematics that is involved with differentiation and integration over vector fields. In this section we present a brief overview of this area. We begin with a very important mathematical operator called del ( ). Del is defined as the partial derivatives of a vector. Letting i, k, and j denote the unit vectors for the coordinate axes in real 3-space, the operator is defined [5]: 1

= i d dx + j d dy + k d dz. With del defined, we may now look at four key differential operators that are based on del. Note that we will be using uppercase letters to denote vector fields, and lower case letters to denote scalar fields. First we have the gradient. The gradient is defined as the measurement of the rate and direction of change in a scalar field. The gradient maps a scalar field to a vector field. So, for a scalar field f [6]: grad(f) = (f). As an example of gradient, consider the scalar field f = xy 2 + z.we take the partial derivatives with respect to x, y, and z. d dx = y2 d dy = 2x d dx = 1 So, the gradient is: grad(f) = y 2 i + 2xj + k. At any point (x,y,z), there is a directional vector that is a part of this vector field. For example, at (1,0,0), the vector would be 2j + k. Next we have curl, which is defined as the measurement of the tendency to rotate about a point in a vector field. The curl maps a vector field to another vector field. For vector F, we define [6]: curl(f) = F. 2

For example, consider vector field F = xi xyj + z 2 k. We can express the curl(f) symbolically as the following determinant: i j k d dx d dy d dz x xy z 2 Letting F1 = x, F2 = xy, and F3 = z 2 this can be expressed using the cross product form as df3 df2 dy dz i df3 df1 dx dz j + df2 dx df1 dy k. From this we obtain: (0 0)i (0 0)j + ( y 0)k, that is, curl(f) = yk. Third, we have divergence. Divergence is models the magnitude of a source or sink at a given point in a vector field. Divergence maps a vector field to a scalar field. For a vector filed F [6]: div(f) = F At any point in a vector field, divergence is positive if there is an outflow, negative if there is an inflow, and zero if there is no convergence or divergence [12]. For example, the upper left vector field, F = xi +yj, where div(f) = 1 + 1 = 2, there is an outflow, which makes sense as the divergence is positive. If we now look at the bottom left vector field, F = yi +xj, where div(f) = 0 + 0, there is neither outflow or inflow, which again makes sense due to the divergence being 0. 3

[13] Figure 1. As an example, consider once again F = xi xyj + z 2 k. F = df1 + df2 + df3 = i xj + 2zk. dx dy dz And finally, we have the Laplacian, represented as. The Laplacian is defined as the composition of the divergence and gradient operations. This maps a scalar field onto another scalar field. The Laplacian of f is defined as [6]: f = 2 f = f For example, consider field f = xy 2 + z 3 2 f = d2 f dx 2 + d2 f dy 2 + d2 f dz 2 = d dx (y2 + 0) + d dy (2xy + 0) + d dz (0 + 3z2 ) = 2x + 6z 4

The Navier-Stokes Equation Let us now consider the Navier-Stokes equation, what it means, and how it can be used to simulate something physical phenomena like smoke and fire. As observed in [1], the Navier- Stokes equation can be viewed as an application of Newton s second law, F = ma, which states that force is the product of the mass of an object times its acceleration. (Note, we will now be using f to represent forces, not scalar or vector fields.) In this equivalent equation, we see the use of density and shear stress. Density is a measurement of an objects mass per unit volume, while shear stress is defined as the component of stress coplanar with a material cross section, where the force vector component runs parallel to the cross section. Consider [1]: ρ du + u u = σ + f dt where ρ denotes the density of the fluid and is equivalent to mass, du + u u is the acceleration and u is velocity, and σ + f is the total force, with σ being the shear stress and f being all other forces. We may also write this as dt ρ du dt + u. u = p + µ 2 u + f [1] Where ρ is pressure and µ is dynamic viscosity. Viscosity is defined as the measure of the resistance of a fluid which is being deformed by the shear stress. Finally, by dividing out ρ and subtracting u u, we obtain the traditional form of the Navier-Stokes equation [10]: du dt = (u ) u 1 ρ p + γ 2 u + f 5

components. Notice that Navier-Stokes explicitly models changes in the directional velocity using four The first of these is (u ) u, which is the divergence on a velocity, or in simpler terms, it is how the divergence affects the velocity. One image that may help explain this is that of a river. When the river converges, the narrowing acts like a funnel, and the overall velocity of the flow increases (see Figure 2). Conversely, if the river diverges, the particles spread out, and the overall speed of the flow decreases (see Figure 3). [3] Figure 2. [7] 6 Figure 3.

Second, there is 1 p. This may be thought of as how the particles move as pressure ρ changes, specifically, the tendency to move away from areas of higher pressure. Consider a flock of birds flying together, and imagine a hawk attacking them. Think of the hawk as a source of pressure being applied to the fluid of birds. Those birds would want to move away from an area of high pressure (see Figure 4). If there is a dense group, it will be harder for all of them to get away. So, the less dense a group, the more of the units that can move rapidly when pressure is exerted. [11] Figure 4. We may also look at this from the perspective of placing pressure on a polymer versus a solid. On a polymer, which is less dense than a solid, the pressure forces the material to spread out (see Figure 5). 7

[8] Figure 5. Now, for the solid, the material stays together (see Figure 6). [2] Figure 6. Next we consider the term γ 2 u. The two key parts are viscosity (γ) and Laplacian ( 2 ). It may be a little hard to make sense of this part, but think of it as the difference between what a particle does and what its neighbors do. Think of a high viscous substance, such as syrup. The motion of a particle in a pool of thick syrup will tend to induce nearby particles to move (see Figure 7). In contrast, in a less viscous fluid, such as water, the motion of a particle induces a lower effect on its neighbors (see Figure 8). 8

[9] Figure 7. [4] Figure 8. And last we have f, which again, is any other forces acting on the substance. Application An application of the Navier-Stokes equation may be found in Joe Stam s paper, Stable Fluids, which proposes a model that can produce complex fluid like flows [10]. It begins by defining a two-dimensional or three-dimensional grid using the dimensions origin O[NDIM] and length L[NDIM] of each side of the grid, and the number of cells in each coordinate N[NDIM], with the size of each voxel being D[i] = L[i]/N[i]. Next, two cell-centered grids U0[NDIM] and U1[NDIM] are created, where at each step of the algorithm, one grid represents 9

the result of the previous grid, with the new solution stored in the second grid, after which the grids are swapped. Grids S0 and S1 are created to hold scalar fields corresponding to substances transported by the flow. The variable dt represents the speed of interactivity. Lastly, the variable visc is the viscosity, ks is the diffusion rate, and as is the dissipation rate. The forces that set the fluid into motion are given in the array F[NDIM], along with an array Ssource for the scalar field. In the simulator, there are two key steps, Vstep and Sstep. Vstep, a velocity solver, takes grids U0 and U1, visc, F (the forces) and dt. As described in the paper, forces are added to the field, the field is advected by itself, the field diffuses due to viscous friction within the fluid, and in the final step the velocity is forced to conserve mass [10]. Sstep, a scalar solver, takes the scalar grids S0 and S1, diffusion constant ks, dissipation constant as, a grid U1, a source variable Ssource, and dt. It has four steps: adding Ssource, transporting the particles in field U, diffusing the field, and dissipating the field. The aforementioned transport is used to resolve the non-linearity of the Navier-Stokes equations, by tracing a path back starting at X (which is, given Origin O, cell (i, j, k), and size D, X = O + (i + 0.5, j + 0.5, k + 0.5) D) through the field U over time dt. The function LinInterp is then called to linearly interpolate the value of the scalar field S at location X0. In the end, this allows for the movement of the fluid particles in the grid, allowing for complex animations, such as fire and smoke, to occur. Hopefully, this now gives a better understanding to how the Navier-Stokes equation works. 10

[10] Figure 9 Smoke simulated using the Navier-Stokes application. [10] Figure 10 Fire simulated using the Navier-Stokes application. 11

Bibliography [1] Bakker, Andre. "Computational Fluid Dynamics." Lecture 4 - Classification of Flows. N.p., 2006. Web. 14 May 2012. <http://www.bakker.org/dartmouth06/engs150/04-clsfn.pdf>. [2] bare-knuckles.jpg. N.d. Photograph. Between the TemplesWeb. 17 May 2012. <http://betweenthetemples.com/2011/07/24/bare-knuckled-meditations/>. [3] File:Trout River rapids close to Sambaa Deh Falls Mackenzie Highway, NWT.jpg. N.d. Photograph. n.p. Web. 17 May 2012. [4] fingersonwater01.jpg. N.d. Photograph. The Walsall Schools' Website MachineWeb. 17 May 2012. <http://www.educatr.com/lessonplans "Gradients." World Web Math. N.p., 07 AUG 1997. Web. 14 May 2012. [5] Gradients World Web Math. N.p., 07 AUG 1997. Web 14 May 2012. <http://web.mit.edu/wwmath/vectorc/scalar/grad.html>. [6] Horan, R, and M Lavelle. "The Laplacian." The University of Plymouth. 04 APR 2005, n.d. Web. 14 May 2012. <http://www.tech.plym.ac.uk/maths/resources/pdflatex/laplacian.pdf>. [7] LittleRiver.jpg. N.d. Photograph. n.p. Web. 17 May 2012. 12

<http://www.google.com/imgres?hl=en&safe=off&gbv=2&biw=1366&bih=625&tbm=is ch& [8] pasta5.jpg. N.d. Photograph. About.com Gourmet FoodWeb. 17 May 2012. <http://gourmetfood.about.com/od/cookingtechniques/ss/freshpasta_5.htm>. [9] pouring syrup.jpg. N.d. Photograph. Cooking BooksWeb. 17 May 2012. <http://cooking- books.blogspot.com/2008/12/sirupsnitter-norwegian-christmas.html>. [10] Stam, Jos. "Stable Fluids." Alias wavefront, n.d. Web. 14 May 2012. <http://www.dgp.toronto.edu/people/stam/reality/research/pdf/ns.pdf>. [11] Sutherland, zen. N.d. Photograph. Gardening with BinocularsWeb. 17 May 2012. <http://gardeningwithbinoculars.blogspot.com/2010/12/critical-mass-of-starlings.html>. [12] Tisdell, Chris, perf. What is the divergence? Chris Tisdell UNSW Sydney. 2011. Film. <http://www.youtube.com/watch?v=stg6wwlbtws&feature=channel>. [13] Vector Field. N.d. Graphic. Wolfram MathWorldWeb. 14 May 2012. <http://mathworld.wolfram.com/vectorfield.html>. 13