Smoothed Particle Hydrodynamics

Similar documents
Test 1 phy What mass of a material with density ρ is required to make a hollow spherical shell having inner radius r i and outer radius r o?

A. Thicknesses and Densities

Rotational Kinematics. Rigid Object about a Fixed Axis Western HS AP Physics 1

Physics 11b Lecture #2. Electric Field Electric Flux Gauss s Law

iclicker Quiz a) True b) False Theoretical physics: the eternal quest for a missing minus sign and/or a factor of two. Which will be an issue today?

Scalars and Vectors Scalar

Dynamics of Rigid Bodies

Chapter 23: Electric Potential

VEKTORANALYS FLUX INTEGRAL LINE INTEGRAL. and. Kursvecka 2. Kapitel 4 5. Sidor 29 50

V. Principles of Irreversible Thermodynamics. s = S - S 0 (7.3) s = = - g i, k. "Flux": = da i. "Force": = -Â g a ik k = X i. Â J i X i (7.

Density Functional Theory I

Physics 2A Chapter 11 - Universal Gravitation Fall 2017

PHY121 Formula Sheet

Consider two masses m 1 at x = x 1 and m 2 at x 2.

Chapter I Matrices, Vectors, & Vector Calculus 1-1, 1-9, 1-10, 1-11, 1-17, 1-18, 1-25, 1-27, 1-36, 1-37, 1-41.

Chapter Fifiteen. Surfaces Revisited

PHY126 Summer Session I, 2008

Set of square-integrable function 2 L : function space F

19 The Born-Oppenheimer Approximation

Event Shape Update. T. Doyle S. Hanlon I. Skillicorn. A. Everett A. Savin. Event Shapes, A. Everett, U. Wisconsin ZEUS Meeting, October 15,

Slide 1. Quantum Mechanics: the Practice

Evaluation of Various Types of Wall Boundary Conditions for the Boltzmann Equation

4.4 Continuum Thermomechanics

Stellar Astrophysics. dt dr. GM r. The current model for treating convection in stellar interiors is called mixing length theory:

Energy in Closed Systems

CSU ATS601 Fall Other reading: Vallis 2.1, 2.2; Marshall and Plumb Ch. 6; Holton Ch. 2; Schubert Ch r or v i = v r + r (3.

Engineering Mechanics. Force resultants, Torques, Scalar Products, Equivalent Force systems

Integral Vector Operations and Related Theorems Applications in Mechanics and E&M

Review. Physics 231 fall 2007

Rigid Bodies: Equivalent Systems of Forces

PHYS 705: Classical Mechanics. Derivation of Lagrange Equations from D Alembert s Principle

8 Baire Category Theorem and Uniform Boundedness

Chapter 8. Linear Momentum, Impulse, and Collisions

VECTOR MECHANICS FOR ENGINEERS: Vector Mechanics for Engineers: Dynamics. In the current chapter, you will study the motion of systems of particles.

Macroscopic Momentum Balances

COLLEGE OF FOUNDATION AND GENERAL STUDIES PUTRAJAYA CAMPUS FINAL EXAMINATION TRIMESTER /2017

UNIT10 PLANE OF REGRESSION

24-2: Electric Potential Energy. 24-1: What is physics

If there are k binding constraints at x then re-label these constraints so that they are the first k constraints.

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

Implementation in the ANSYS Finite Element Code of the Electric Vector Potential T-Ω,Ω Formulation

PHYS Week 5. Reading Journals today from tables. WebAssign due Wed nite

Waves Basics. April 2001 Number 17

ORDINARY DIFFERENTIAL EQUATIONS EULER S METHOD

Part V: Velocity and Acceleration Analysis of Mechanisms

Electron density: Properties of electron density (non-negative): => exchange-correlation functionals should respect these conditions.

Remember: When an object falls due to gravity its potential energy decreases.

Finite element method simulation of turbulent wavy core-annular flows using a k-ω turbulence model method

Physics 207 Lecture 16

E For K > 0. s s s s Fall Physical Chemistry (II) by M. Lim. singlet. triplet

GCSE: Volumes and Surface Area

Consequences of Long Term Transients in Large Area High Density Plasma Processing: A 3-Dimensional Computational Investigation*

3. A Review of Some Existing AW (BT, CT) Algorithms

Asymptotic Solutions of the Kinetic Boltzmann Equation and Multicomponent Non-Equilibrium Gas Dynamics

Some Approximate Analytical Steady-State Solutions for Cylindrical Fin

Physics 202, Lecture 2. Announcements

Capítulo. Three Dimensions

Multipole Radiation. March 17, 2014

1. A body will remain in a state of rest, or of uniform motion in a straight line unless it

Contact, information, consultations

Physics 1501 Lecture 19

DYNAMICS VECTOR MECHANICS FOR ENGINEERS: Kinematics of Rigid Bodies in Three Dimensions. Seventh Edition CHAPTER

Multistage Median Ranked Set Sampling for Estimating the Population Median

Chapter 13 - Universal Gravitation

Chapter IV Vector and Tensor Analysis IV.2 Vector and Tensor Analysis September 29,

Large scale magnetic field generation by accelerated particles in galactic medium

COMPUTATIONAL METHODS AND ALGORITHMS Vol. I - Methods of Potential Theory - V.I. Agoshkov, P.B. Dubovski

The Greatest Deviation Correlation Coefficient and its Geometrical Interpretation

Multicomponent Flows

CENTROID (AĞIRLIK MERKEZİ )

Physics 201 Lecture 4

P 365. r r r )...(1 365

CENTROID (AĞIRLIK MERKEZİ )

Chapter IV Vector and Tensor Analysis IV.2 Vector and Tensor Analysis September 23,

Description Linear Angular position x displacement x rate of change of position v x x v average rate of change of position

ALL QUESTIONS ARE WORTH 20 POINTS. WORK OUT FIVE PROBLEMS.

a v2 r a' (4v) 2 16 v2 mg mg (2.4kg)(9.8m / s 2 ) 23.52N 23.52N N

1. Starting with the local version of the first law of thermodynamics q. derive the statement of the first law of thermodynamics for a control volume

Review of Vector Algebra and Vector Calculus Operations

Using DP for hierarchical discretization of continuous attributes. Amit Goyal (31 st March 2008)

Objectives. Chapter 6. Learning Outcome. Newton's Laws in Action. Reflection: Reflection: 6.2 Gravitational Field

CIRCUITS 1 DEVELOP TOOLS FOR THE ANALYSIS AND DESIGN OF BASIC LINEAR ELECTRIC CIRCUITS

Physics Exam II Chapters 25-29

Problem Set 9 Solutions

( ) α is determined to be a solution of the one-dimensional minimization problem: = 2. min = 2

Budding yeast colony growth study based on circular granular cell

Chapter 5 Circular Motion

Thermodynamics of solids 4. Statistical thermodynamics and the 3 rd law. Kwangheon Park Kyung Hee University Department of Nuclear Engineering

Tian Zheng Department of Statistics Columbia University

Wave Equations. Michael Fowler, University of Virginia

2/24/2014. The point mass. Impulse for a single collision The impulse of a force is a vector. The Center of Mass. System of particles

VQ widely used in coding speech, image, and video

4 SingularValue Decomposition (SVD)

Machine Learning. Spectral Clustering. Lecture 23, April 14, Reading: Eric Xing 1

Matrix Elements of Many-Electron Wavefunctions. noninteger principal quantum number. solutions to Schröd. Eq. outside sphere of radius r

Multifrontal sparse QR factorization on the GPU

AP Physics C: Electricity and Magnetism 2003 Scoring Guidelines

Multivariate Ratio Estimator of the Population Total under Stratified Random Sampling

THE EQUIVALENCE OF GRAM-SCHMIDT AND QR FACTORIZATION (page 227) Gram-Schmidt provides another way to compute a QR decomposition: n

PARAMETER ESTIMATION FOR TWO WEIBULL POPULATIONS UNDER JOINT TYPE II CENSORED SCHEME

Transcription:

Smooted Patcle Hydodynamcs Applcaton Example Alan Hec Noembe 9, 010

Fluds Nae-Stokes equatons Smooted Patcle Hydodynamcs Smooted Patcle Hydodynamcs Noembe 010

Fluds Lquds, e.g. wate Gasses, e.g. a Plasmas 3 Smooted Patcle Hydodynamcs Noembe 010

Fluds Descbed by (ncompessble) Nae-Stokes equatons g p t ( ) 0 Den by gaty g, pessue and elocty Flud flows fom g pessue to low pessue Vscosty µ detemnes flud stckness Low scosty: a, wate Hg scosty: oney, mud p 4 Smooted Patcle Hydodynamcs Noembe 010

Fluds 5 Smooted Patcle Hydodynamcs Noembe 010

Fluds Nae-Stokes equatons Smooted Patcle Hydodynamcs 6 Smooted Patcle Hydodynamcs Noembe 010

7 Smooted Patcle Hydodynamcs Noembe 010 Incompessble Nae-Stokes equatons - densty, p pessue (scalas) g gaty, elocty (ectos) conecte acceleaton p = k( - 0 ) estng densty 0 p g t 0 ) ( z p y p x p p,, z y x z z y y x x,, (mass contnuty),,, z y x x x x x z y x

Incompessble Nae-Stokes equatons t g p Mass contnuty equaton: ( ) 0 x x y y z z 0 Mass contnuty wll be satsfed tally by usng a patcle fomulaton, snce eac patcle as constant mass and patcles ae nete ceated no destoyed 8 Smooted Patcle Hydodynamcs Noembe 010

Incompessble Nae-Stokes equatons t g p Te mateal deate s te deate along a pat wt elocty. To smulate wt patcles take te mateal deate D g p Dt Fo a sngle patcle d dt g 1 p 9 Smooted Patcle Hydodynamcs Noembe 010

Incompessble Nae-Stokes equatons Te Nae-Stokes equatons ae senste to scale, so we smulate tem at 0.004x scale elate to te pyscal enonment. 10 Smooted Patcle Hydodynamcs Noembe 010

Fluds Nae-Stokes equatons Smooted Patcle Hydodynamcs 11 Smooted Patcle Hydodynamcs Noembe 010

1 Smooted Patcle Hydodynamcs Noembe 010 Smooted Patcle Hydodynamcs [Monagan 199] ntoduced smootng kenels W And appoxmatons to tems of te N-S equatons m mass, poston, - adus ), ( ) ( ), ( ) ( ) ( W A d W A A b b b W m ), ( ), ( W p p m p ), ( W m

13 Smooted Patcle Hydodynamcs Noembe 010 Smooted Patcle Hydodynamcs Oe tme te lteatue as coneged on tese W: w = 0 at dstance w sums to 1 oe spee of adus ) ( 3 64 315 ), ( 9 b W b b b b b W 45 ), ( 6 b W b 6 45 ), (

14 Smooted Patcle Hydodynamcs Noembe 010 Smooted Patcle Hydodynamcs Fom Nae-Stokes to SPH: p g dt d 1 m b ) ( 3 64 315 9 b b b p p m p 45 6 b m 6 45 ) ( (1) () (3) (4)

Fluds Nae-Stokes equatons Smooted Patcle Hydodynamcs 15 Smooted Patcle Hydodynamcs Noembe 010

Numecal algotm: densty = equaton (). pessue p = k( - 0) pessue gadent = equaton (3). scous tem = equaton (4). acceleaton = equaton (1). numecally ntegate elocty, poston. p 16 Smooted Patcle Hydodynamcs Noembe 010

A naïe algotm computes nteactons among all patcles Ges coect esult because W= 0 fo patcles beyond te nteacton adus But ts as complexty O(n^) Need an algotm tat only computes nteactons among patcles tat ae wtn te nteacton adus 17 Smooted Patcle Hydodynamcs Noembe 010

A bette algotm pattons space nto local egons Dde nto oxels of sze on a sde Eac patcle can only nteact wt patcles n te same oxel, and n mmedately adacent oxels Total seac olume = xx oxels Fute efnement: compute nteactons wt a lmted numbe m of patcles m = 3 woks well 18 Smooted Patcle Hydodynamcs Noembe 010

Te fnal algotm: Oganze patcles nto oxels Compute spatal ndex fom oxel to patcles Fo eey patcle Examne local egon of xx oxels Compute nteactons wt 3 patcles 19 Smooted Patcle Hydodynamcs Noembe 010

Inteop allows a buffe to be saed between OpenCL and a gapcs subsystem. Ts aods an expense ound tp to ost memoy Ts s cucal fo g pefomance applcatons Due to lmts of tme we dd not mplement nteop n te gapcs code, owee we wll sow you te OpenCL ntalzaton fo nteop fo efeence. 0 Smooted Patcle Hydodynamcs Noembe 010

To nteop wt dx10 nclude cl_d3d10. and defne USE_DX_INTEROP #defne USE_DX_INTEROP #f defned( APPLE ) defned( MACOSX) #nclude <OpenCL/cl.pp> #nclude <OpenCL/cl_d3d10.> #else #nclude <CL/cl.pp> #nclude <CL/cl_d3d10.> #endf 1 Smooted Patcle Hydodynamcs Noembe 010

To nteop wt dx10 ntalze te OpenCL context: cl_context_popetes *cpops; cpops = new cl_context_popetes[ 6 ]; cpops[ 0 ] = CL_CONTEXT_D3D10_DEVICE_KHR; cpops[ 1 ] = (ntpt_t) DXUTGetD3D10Dece(); cpops[ ] = CL_CONTEXT_PLATFORM; cpops[ 3 ] = (cl_context_popetes)(platfomlst[0])(); cpops[ 4 ] = cpops[ 5 ] = 0; context = cl::context( CL_DEVICE_TYPE_GPU, cpops, NULL, NULL, &e); Smooted Patcle Hydodynamcs Noembe 010

Buffes poston, elocty, acceleaton float4 patcleindex unt sotedposton, sotedvelocty float4 gdcellindex, gdcellindexfxedup - unt Kenels aspatcles, sot, sotpostpass ndexx, ndexpostpass fndnegbos computedenstypessue, computeacceleaton, ntegate 3 Smooted Patcle Hydodynamcs Noembe 010

Te fnal algotm: Oganze patcles nto oxels aspatcles, sot, sotpostpass Compute spatal ndex fom oxel to patcles ndexx, ndexpostpass Fo eey patcle Examne local egon of xx oxels fndnegbos Compute nteactons wt 3 patcles computedenstypessue, computeacceleaton, ntegate 4 Smooted Patcle Hydodynamcs Noembe 010

Oganze patcles nto oxels: global_d(0)=patcle d aspatcles: computes a scala oxel d fom poston Voxel sze x stoes oxel d n poston.w; wtes {oxel d,global_d(0)} to patcleindex sot: sots patcleindex by oxel d adxsot woks only on GPU, use qsot on CPU sotpostpass: ewte poston,elocty nto sotedposton,sotedvelocty accodng to ode of patcleindex 5 Smooted Patcle Hydodynamcs Noembe 010

Compute spatal ndex fom oxel to patcles: global_d(0) = oxel d ndexx: computes gdcellindex(), ndex nto sotedposton of fst patcle n oxel Bnay seac n sotedposton fo lowest patcle d Leae -1 fo empty oxels ndexpostpass: Flls n ndex fo empty oxels gdcellindex( ) = gdcellindex( +1 ) fo empty, +1 nonempty 6 Smooted Patcle Hydodynamcs Noembe 010

Examne local egon of xx oxels: fndnegbos: Locates patcle n one cone of xx oxel set Seaces up to 8 oxels untl 3 negbos ae found Retans only negbos wtn nteacton adus Wtn eac oxel seac s andomzed Necessay to elmnate basng atfacts Specfcally, compute andom offset wtn oxel, ten poceed sequentally Altenate sequental dectons accodng to odd/eenness of patcle 7 Smooted Patcle Hydodynamcs Noembe 010

Compute nteactons wt 3 patcles: computedenstypessue: Equaton () followed by p = k( - 0 ) computeacceleaton: Equatons (3), (4), (1) ntegate: Sem-mplct Eule ntegaton = + dt a, poston = poston + dt Bounday condtons peent patcle escape 8 Smooted Patcle Hydodynamcs Noembe 010

Summay Fluds Goened by pessue, elocty Nae-Stokes equatons Incompessble equatons, mateal deate Smooted Patcle Hydodynamcs Smootng kenel appoxmatons Appoxmate, p, Oganze nto oxels, ceate oxel ndex, compute equatons (), (3), (4), (1), ntegate 9 Smooted Patcle Hydodynamcs Noembe 010

Questons and Answes Vst te OpenCL Zone on deelope.amd.com ttp://deelope.amd.com/zones/openclzone/ Tutoals, deelope gudes, and moe OpenCL Pogammng Webnas page ncludes: Scedule of upcomng webnas On-demand esons of ts and past webnas Slde decks of ts and past webnas Souce code fo Smooted Patcle Hydodynamcs webna 30 Smooted Patcle Hydodynamcs Noembe 010

Tademak Attbuton AMD, te AMD Aow logo and combnatons teeof ae tademaks of Adanced Mco Deces, Inc. n te Unted States and/o ote usdctons. Ote names used n ts pesentaton ae fo dentfcaton puposes only and may be tademaks of te especte ownes. 009 Adanced Mco Deces, Inc. All gts eseed. 31 Smooted Patcle Hydodynamcs Noembe 010