Computational Fluid Dynamics. Smoothed Particle Hydrodynamics. Simulations. Smoothing Kernels and Basis of SPH

Similar documents
Numerical Heat and Mass Transfer

ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM

Tensor Smooth Length for SPH Modelling of High Speed Impact

Introduction to Computational Fluid Dynamics

Lecture 12: Discrete Laplacian

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

Physics 207: Lecture 20. Today s Agenda Homework for Monday

CONTROLLED FLOW SIMULATION USING SPH METHOD

arxiv: v1 [physics.flu-dyn] 16 Sep 2013

Bindel, Spring 2014 Applications of Parallel Computers (CS 5220)

Module 1 : The equation of continuity. Lecture 1: Equation of Continuity

MATH 5630: Discrete Time-Space Model Hung Phan, UMass Lowell March 1, 2018

Implicit Integration Henyey Method

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Appendix B. The Finite Difference Scheme

12. The Hamilton-Jacobi Equation Michael Fowler

Physics 181. Particle Systems

Mathematical Preparations

Errors for Linear Systems

Buckingham s pi-theorem

Temperature. Chapter Heat Engine

2 Finite difference basics

PHYS 705: Classical Mechanics. Newtonian Mechanics

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Week 11: Chapter 11. The Vector Product. The Vector Product Defined. The Vector Product and Torque. More About the Vector Product

The Finite Element Method

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system

Week 9 Chapter 10 Section 1-5

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Physics 53. Rotational Motion 3. Sir, I have found you an argument, but I am not obliged to find you an understanding.

Moments of Inertia. and reminds us of the analogous equation for linear momentum p= mv, which is of the form. The kinetic energy of the body is.

χ x B E (c) Figure 2.1.1: (a) a material particle in a body, (b) a place in space, (c) a configuration of the body

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

A particle in a state of uniform motion remain in that state of motion unless acted upon by external force.

Report on Image warping

NUMERICAL DIFFERENTIATION

Turbulent Flow. Turbulent Flow

Problem Set 9 Solutions

Difference Equations

Integrals and Invariants of Euler-Lagrange Equations

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography

(Online First)A Lattice Boltzmann Scheme for Diffusion Equation in Spherical Coordinate

Lecture 5.8 Flux Vector Splitting

N-Body Simulation. Typical uncertainty: π = 4 Acircle/Asquare! 4 ncircle/n. πest π = O(n

THE SUMMATION NOTATION Ʃ

Foundations of Arithmetic

Open Systems: Chemical Potential and Partial Molar Quantities Chemical Potential

Newton s Laws of Motion

Lecture 20: Noether s Theorem

SMOOTHED PARTICLE HYDRODYNAMICS METHOD FOR TWO-DIMENSIONAL STEFAN PROBLEM

Physics 5153 Classical Mechanics. Principle of Virtual Work-1

Global Sensitivity. Tuesday 20 th February, 2018

One-sided finite-difference approximations suitable for use with Richardson extrapolation

The Feynman path integral

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11)

Physics 207 Lecture 6

1 Matrix representations of canonical matrices

NON-CENTRAL 7-POINT FORMULA IN THE METHOD OF LINES FOR PARABOLIC AND BURGERS' EQUATIONS

Supplementary Notes for Chapter 9 Mixture Thermodynamics

Bezier curves. Michael S. Floater. August 25, These notes provide an introduction to Bezier curves. i=0

CHAPTER 14 GENERAL PERTURBATION THEORY

Some Comments on Accelerating Convergence of Iterative Sequences Using Direct Inversion of the Iterative Subspace (DIIS)

Numerical Transient Heat Conduction Experiment

Thermodynamics General

Advanced Quantum Mechanics

STUDY ON TWO PHASE FLOW IN MICRO CHANNEL BASED ON EXPERI- MENTS AND NUMERICAL EXAMINATIONS

DUE: WEDS FEB 21ST 2018

PHYS 705: Classical Mechanics. Canonical Transformation II

Normally, in one phase reservoir simulation we would deal with one of the following fluid systems:

Inductance Calculation for Conductors of Arbitrary Shape

Linear Momentum. Center of Mass.

MMA and GCMMA two methods for nonlinear optimization

Turbulence and its Modelling

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 6

Bézier curves. Michael S. Floater. September 10, These notes provide an introduction to Bézier curves. i=0

Note 10. Modeling and Simulation of Dynamic Systems

First Law: A body at rest remains at rest, a body in motion continues to move at constant velocity, unless acted upon by an external force.

Rotor Noise Modeling Kenneth S. Brentner Penn State University

4DVAR, according to the name, is a four-dimensional variational method.

where v means the change in velocity, and t is the

Chapter 8. Potential Energy and Conservation of Energy

Singular Value Decomposition: Theory and Applications

Thermal-Fluids I. Chapter 18 Transient heat conduction. Dr. Primal Fernando Ph: (850)

Advanced Circuits Topics - Part 1 by Dr. Colton (Fall 2017)

Section 8.3 Polar Form of Complex Numbers

Lecture Note 3. Eshelby s Inclusion II

The equation of motion of a dynamical system is given by a set of differential equations. That is (1)

Spin-rotation coupling of the angularly accelerated rigid body

NUMERICAL MODEL FOR NON-DARCY FLOW THROUGH COARSE POROUS MEDIA USING THE MOVING PARTICLE SIMULATION METHOD

Computational Astrophysics

Kernel Methods and SVMs Extension

Solution Thermodynamics

Lagrangian Field Theory

A PROCEDURE FOR SIMULATING THE NONLINEAR CONDUCTION HEAT TRANSFER IN A BODY WITH TEMPERATURE DEPENDENT THERMAL CONDUCTIVITY.

Solutions for Euler and Navier-Stokes Equations in Powers of Time

Chapter 3 Differentiation and Integration

On the correction of the h-index for career length

Canonical transformations

Transcription:

Computatonal Flud Dynamcs If you want to learn a bt more of the math behnd flud dynamcs, read my prevous post about the Naver- Stokes equatons and Newtonan fluds. The equatons derved n the post are the equatons whch govern moton of common fluds such as water, honey, and so on. If you just want to see runnng code, t s on GtHub. Smulatons Due to the complex nature of the Naver-Stokes equatons, analytcal solutons range from dffcult to practcally mpossble, so the most common way to make use of the Naver-Stokes equatons s through smulaton and approxmaton. A number of smulaton methods exst, and n the next secton, we wll examne one of the algorthms often used n computer graphcs and nteractve applcatons. Smoothed Partcle Hydrodynamcs One of the most researched and most used methods for flud smulatons, especally n nteractve applcatons, s a partcle-based approach known as Smoothed Partcle Hydrodynamcs (SPH). SPH s, at the most basc level, an attempt to dscretze the Naver-Stokes equatons. In addton to the flud partcles themselves, a smoothng functon (called the smoothng kernel) s used whch spreads the propertes of each partcle over a contnuum. In fact, SPH s often called an nterpolaton method for partcle systems. We wll now derve and demonstrate the use of SPH for modelng a smple ncompressble Newtonan flud. Smoothng Kernels and Bass of SPH Snce SPH s essentally an nterpolaton method for partcle systems, one of the key deas behnd t s the ablty to evaluate a scalar quantty n any pont n space, even though the quantty only truly has a value at the dscrete partcles. In order to evaluate a quantty A at a pont r, we use the followng equaton: A( r) = j W ( r r j, h). Ths s a weghted summaton of all the partcles around the pont. s the value of A at the partcle, s the mass of the partcle, s the densty of the partcle, and W ( r r j, h) s the weghtng factor, and h s the maxmum dstance. The functon W s also called the smoothng kernel, because t smoothes the partcle values throughout contnuous space. The smoothng functon W has a few notable propertes. Frst of all, the functon should decrease as the dstance ncreases; ths s only logcal, snce the ponts nearby should have more nfluence than those far away. Second of all, the kernel should evaluate to 0 at dstances equal to or greater than h. Fnally, the smoothng kernel should be normalzed. A normalzed smoothng kernel satsfes the equaton W ( r, h)dr = 1. Dervatves of Quanttes The Naver-Stokes equatons often requre calculatng the frst or second dervatves of varous quanttes. Ths s partcularly easy n SPH, because the dervatve of a quantty s r A( r) = r j W ( r r j, h). Equvalently, Thus, r A( r) = j A( r) = j r W ( r r j, h). W ( r r j, h) 1

and 2 A( r) = j 2 W ( r r j, h). Calculatng Densty As you may have notced, the equaton for the SPH value of a scalar quantty ncludes both a mass and a densty term. Ths s because each partcle represents a small volume V = m ρ. The Naver-Stokes equatons for an ncompressble flud (such as water) requre that the densty term s constant; however, due to the nature of SPH, mantanng a constant densty s very dffcult. Snce n many applcatons accuracy s less mportant than realsm and speed, we gnore the requrement that densty s constant. We can later compensate for that by makng the densty restorng force (pressure) very strong. Snce densty ρ s non-constant, we may need to calculate densty at a gven poston. Snce densty s yet another ntensve property, we can apply the SPH equaton above to get = j W ( r r j, h) = j W ( r r j, h). The problem of densty s one of the bggest reasons not to use SPH for models whch requre precson or accuracy. SPH s meant to provde a realstc-lookng flud smulaton, at the cost of gnorng certan requrements, such as symmetry, conservaton of momentum, or constant densty. Smulaton The Naver-Stokes equatons can now be appled to the SPH partcles. We have two man equatons. The frst s the conservaton of mass equaton, v = 0. The second equaton stems from the conservaton of momentum, and states that ρ Dv Dt = p + µ 2 v + f. The frst equaton s guaranteed for partcle systems, because we have a constant amount of partcles, each wth a constant mass. Therefore, the total mass remans constant, and we can gnore the frst equaton. The second equaton dctates the moton of the partcles. The left hand term s the change n momentum. Therefore, we can express the acceleraton of each partcle as a = f ρ where f s the sum of all the force terms on the rght hand sde. In order to be able to smulate the partcle moton, we must express each of the force terms through a dscrete summaton. Force Terms: Pressure If we apply our SPH equaton to pressure, we arrve at the equaton f pressure = p( r) = p j W ( r r j, h). However, ths sn t symmetrc. Pressure should be symmetrc, snce every acton should have an equal and opposte reacton; however, f we examne a 2-partcle system, the pressure of partcle depends on the pressure of partcle j and vce versa, so symmetry s not guaranteed n the general case. In order to rectfy ths, we can use a dfferent pressure equaton, whch uses an average of partcle pressures to ensure symmetry: f pressure = p( r) = p + p j W ( r r j, h). 2 We must also remember that the only state a partcle keeps around s ts mass, densty, and velocty. Thus, we cannot just use pressure, we must calculate t. Usng the deal gas state equaton, we can say that p = kρ. 2

In order to make the smulaton more numercally stable, we can make pressure smaller by usng the dfference. Snce the equaton uses the gradent of pressure, the math s unchanged f we use the equaton p = k(ρ ρ o ) where ρ o s the rest densty. By dong ths substtuton, we reduce the value of p, and thus decrease the effects of floatng pont roundng errors ntroduced by the computatons. Force Terms: Vscosty Applyng SPH prncples to vscosty, we arrve at the equaton f vscosty = µ 2 v( r ) = µ v j 2 W ( r r j, h). However, we encounter the same problem as before, namely that the vscosty force s non-symmetrc. We can resolve t n a smlar manner, usng the dfference n veloctes nstead. The resultng equaton takes the form of f vscosty = µ v j v 2 W ( r r j, h). In physcal terms, ths equaton states that a partcle s accelerated n the drecton that ts envronment s movng. Thnkng about a floatng partcle n a stream of lqud, ths makes sense. Force Terms: Surface Tenson In a flud, molecules experence ntramolecular attracton forces. For a partcle embedded nsde the flud, the force s evened out; however, for partcles on the edge of the flud, the force does cause an acceleraton, and thus s non-neglgble. Snce each partcle s the cause of the ntramolecular attracton, we defne another quantty (called color for convenence) such that c s equal to 1 at every partcle and 0 otherwse. Therefore, the equaton that descrbes the SPH quantty for c would be c( r) = c j W ( r r j, h). Snce c s 1 at all partcle locatons, we can smplfy ths to say that c( r) = 1 W ( r r j, h). For physcal reasons that are beyond the scope of ths analyss, the surface tenson force s equal to f surface = σκ n = σ 2 c n n. We try to avod calculatng the force when n s small, because that causes problems because we are dvdng by a small floatng pont number. We only calculate the surface tenson force when n s greater than a gven preset. The fnal equaton for the surface tenson force (when we calculate t) would be Force Terms: External Forces f surface = σ 2 c c c. External forces are smply appled to every partcle as they would be to a normal mass. If a partcle touches (or goes nto) a sold object, t s reflected (pushed out wth t s velocty vector reflected over the object normal vector). Smoothng Kernels The smoothng kernel functons are requred to do the actual computatons for smulaton. The qualty of smulaton, as well as the speed and accuracy, hghly depend on the choce of smoothng kernels. In the orgnal SPH publcaton that nvestgated smulatng fluds n real-tme [2], the authors suggested the use of three dfferent kernels for dfferent thngs. Note that the smoothng kernels are pece-wse functons; the functons presented subsequently defne the values of W for 0 r h. In other cases, W = 0. Note that the followng smoothng kernels are not normalzed, and should be pror to use. 3

General Smoothng Kernel The general smoothng kernel, used n all but two cases, s a sxth-degree polynomal wth the equaton W g (r, h) = 315 64πh 9 ( h 2 r 2) 3. One of the benefts of ths emprcally desgned kernel s that t uses r 2, whch means that we never need to calculate r. Calculatng r would be an expensve operaton, because t nvolves a square root; calculatng r 2, however, nvolves only multplcaton, and s thus much faster. Pressure Kernel For calculatons nvolvng pressure, the general kernel becomes zero when partcles are very close together. Ths s not what fluds actually act lke - n fact, as partcles come closer together, they should repel more due to pressure nstead of less. Thus, Desbrun [6] suggests a dfferent smoothng kernel of the form Vscosty Kernel W p (r, h) = 15 πh 6 (h r)3. The fnal smoothng kernel we are usng s specfc to the vscosty term. If we were to use the general smoothng term for vscosty, two partcles whch are very close to each other could possbly ncrease n speed. Ths s ncorrect, snce vscosty s a frcton force, whch should not be ncreasng the energy n the system. Thus, the authors of the orgnal flud smulaton SPH paper suggest usng the kernel of Ongong Research W v (r, h) = r3 2h 3 + r2 h 2 + h 2r 1. Although the Naver-Stokes equatons were orgnally formulated nearly 200 years ago, flud mechancs s a rapdly evolvng feld. The advent of computer technology has allowed physcsts to accurately model the behavour of fluds through teratve approxmatons of ther behavour, makng the study of the Naver-Stokes equatons stll more mportant. Current research can be subdvded nto two categores: one form of research s theoretcal, seekng mathematcal proof of the exstence and smoothness of the soluton to Naver-Stokes; the other branch of ongong research s more focused on practcal applcaton of Naver-Stokes to real-world problems. Though n some cases the dstncton s purely artfcal, t s nonetheless useful n dscussng the varous topcs currently beng nvestgated. Theoretcal Research The fundamental theoretcal problem of Naver-Stokes s one of the seven Mllenum Prze Problems. The Mllenum Prze Problems are seven mathematcal problems put forth by the Clay Mathematcs Insttute n the year 2000; the frst person to offer a vald soluton to any of the problems s promsed a mllon-dollar reward. The problem of Naver-Stokes, as stated by the Clay Mathematcs Insttute, s as follows: Prove or gve a counter-example of the followng statement: In three space dmensons and tme, gven an ntal velocty feld, there exsts a vector velocty and a scalar pressure feld, whch are both smooth and globally defned, that solve the Naver-Stokes equatons. Though ths statement tself has not been proven or ndcated false, attempts at proof have come close. It s known that for Naver-Stokes n two dmensons, the solutons exst and are smooth. In addton, t s known that for low ntal veloctes, smooth solutons to 3-dmensonal Naver-Stokes exst; however, for hgher ntal veloctes, the exstence of smooth solutons has not been proven. Practcal Research Though the mathematcal problem posed by Naver-Stokes has not yet been resolved, computer-aded approxmatons are sutable for many purposes. From the desgn of aerodynamc arcraft to smulaton of water for Pxar flms, flud smulatons are hghly used n ndustry. Much current research n the feld of computatonal 4

flud dynamcs (CFD) attempts to fnd faster or more-accurate approxmaton algorthms n order to make these smulatons more useful stll. The methods used n CFD can be broken down nto two categores: dscretzaton models and turbulence models. Dscretzaton models attempt to break the flud nto a dscrete set of elements, and teratvely smulate the moton of the flud through tme usng the Naver-Stokes equatons. Turbulence models deal wth turbulence, a chaotc type of flud flow, whch s nearly mpossble to smulate as wth the dscretzaton models; nstead, turbulence models attempt to track or obtan the value of specfc propertes of a flud over tme. Though the basc equatons used are the same, approxmaton methods often take dfferent approaches, dependng on ther objectve. Some methods, especally ones amed towards very fast or nteractve flud smulaton, use partcle based modelng. A volume of flud s subdvded nto a fnte number of partcles, and each partcle s subject to the velocty felds dctated by the Naver-Stokes equatons as well as external forces. Ths model typcally smplfes computaton and mplementaton, and s commonly used n computer graphcs and computer games. The partcle nature s usually hdden by nterpolatng partcle postons through a process called pont splattng. Smoothed Partcle Hydrodynamcs, the method nvestgated n the prevous secton, falls under that category. Other methods, however, use a three-dmensonal grd (a mesh ) to model the flud. The nternals and boundares are tracked through teratve Naver-Stokes approxmatons; the beneft of ths method s a hgher precson and hgher flexblty n terms of nteracton wth other bodes, at the cost of computatonal speed. 5