Computational Astrophysics

Similar documents
Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows

CBE 6333, R. Levicky 1 Differential Balance Equations

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

Lecture 16 - Free Surface Flows. Applied Computational Fluid Dynamics

Plates and Shells: Theory and Computation - 4D9 - Dr Fehmi Cirak (fc286@) Office: Inglis building mezzanine level (INO 31)

State of Stress at Point

Electrostatic Fields: Coulomb s Law & the Electric Field Intensity

Copyright 2011 Casa Software Ltd. Centre of Mass

5 Numerical Differentiation

1 The basic equations of fluid dynamics

Enhancing SPH using Moving Least-Squares and Radial Basis Functions

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Express Introductory Training in ANSYS Fluent Lecture 1 Introduction to the CFD Methodology

Review of Vector Analysis in Cartesian Coordinates

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS

Feature Commercial codes In-house codes

3. Reaction Diffusion Equations Consider the following ODE model for population growth

Elasticity Theory Basics

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

DERIVATIVES AS MATRICES; CHAIN RULE

Continuous Groups, Lie Groups, and Lie Algebras

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

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

SECOND DERIVATIVE TEST FOR CONSTRAINED EXTREMA

Computational Foundations of Cognitive Science

The continuous and discrete Fourier transforms

NOTES ON LINEAR TRANSFORMATIONS

The derivation of the balance equations

CS Software Engineering for Scientific Computing. Lecture 16: Particle Methods; Homework #4

Inner Product Spaces

How To Prove The Dirichlet Unit Theorem

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 10

Finite Element Formulation for Beams - Handout 2 -

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

T ( a i x i ) = a i T (x i ).

The elements used in commercial codes can be classified in two basic categories:

: Introduction to Machine Learning Dr. Rita Osadchy

CBE 6333, R. Levicky 1. Tensor Notation.

Robert Collins CSE598G. More on Mean-shift. R.Collins, CSE, PSU CSE598G Spring 2006

Appendix A: Science Practices for AP Physics 1 and 2

ME6130 An introduction to CFD 1-1

DRAFT. Further mathematics. GCE AS and A level subject content

Linear Programming Notes V Problem Transformations

Introduction to the Finite Element Method

Name: Section Registered In:

CONSERVATION LAWS. See Figures 2 and 1.

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

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

GPU Computing with CUDA Lecture 2 - CUDA Memories. Christopher Cooper Boston University August, 2011 UTFSM, Valparaíso, Chile

Linear Programming. March 14, 2014

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 4: LINEAR MODELS FOR CLASSIFICATION

Customer Training Material. Lecture 2. Introduction to. Methodology ANSYS FLUENT. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved.

An Introduction to Hydrocode Modeling. Gareth S. Collins

7. DYNAMIC LIGHT SCATTERING 7.1 First order temporal autocorrelation function.

2.5 Physically-based Animation

Elastic Wave Propagation

Correlation and Convolution Class Notes for CMSC 426, Fall 2005 David Jacobs

The Quantum Harmonic Oscillator Stephen Webb

(Most of the material presented in this chapter is taken from Thornton and Marion, Chap. 7)

Vector and Matrix Norms

SOLVING LINEAR SYSTEMS

Object-oriented scientific computing

A Primer on Index Notation

Fast Multipole Method for particle interactions: an open source parallel library component

Using the Theory of Reals in. Analyzing Continuous and Hybrid Systems

Chapter 9 Unitary Groups and SU(N)

TWO-DIMENSIONAL FINITE ELEMENT ANALYSIS OF FORCED CONVECTION FLOW AND HEAT TRANSFER IN A LAMINAR CHANNEL FLOW

Scalars, Vectors and Tensors

= N 2 = 3π2 n = k 3 F. The kinetic energy of the uniform system is given by: 4πk 2 dk h2 k 2 2m. (2π) 3 0

Several Views of Support Vector Machines

1 Finite difference example: 1D implicit heat equation

Dimensional analysis is a method for reducing the number and complexity of experimental variables that affect a given physical phenomena.

Lecture 10. Finite difference and finite element methods. Option pricing Sensitivity analysis Numerical examples

Model of a flow in intersecting microchannels. Denis Semyonov

1 Lecture 3: Operators in Quantum Mechanics

University of Lille I PC first year list of exercises n 7. Review

Finite Element Formulation for Plates - Handout 3 -

Fluid Dynamics and the Navier-Stokes Equation

Differentiation of vectors

AN INTRODUCTION TO NUMERICAL METHODS AND ANALYSIS

APPLIED MATHEMATICS ADVANCED LEVEL

Distance Learning Program

THEORETICAL MECHANICS

Lecture 2: Homogeneous Coordinates, Lines and Conics

Basics of Polynomial Theory

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

A RIGOROUS AND COMPLETED STATEMENT ON HELMHOLTZ THEOREM

Physics 1A Lecture 10C

Contents. Microfluidics - Jens Ducrée Physics: Navier-Stokes Equation 1

2.2 Creaseness operator

Applications to Data Smoothing and Image Processing I

This makes sense. t /t 2 dt = 1. t t 2 + 1dt = 2 du = 1 3 u3/2 u=5

3. KINEMATICS IN TWO DIMENSIONS; VECTORS.

6 J - vector electric current density (A/m2 )

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

[1] Diagonal factorization

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Convolution, Correlation, & Fourier Transforms. James R. Graham 10/25/2005

Transcription:

Computational Astrophysics Lecture 1: Introduction to numerical methods Lecture 2: The SPH formulation Lecture 3: Construction of SPH smoothing functions Lecture 4: SPH for general dynamic flow Lecture 5: N-body techniques Lecture 6: Numerical Implementation Project Work (5-6 weeks) David Hobbs Lund Observatory ASTM22

Simula3ng the joint evolu3on of quasars, galaxies and their large- scale distribu3on Authors: Volker Springel, Simon D. M. White, Adrian Jenkins, Carlos S. Frenk, Naoki Yoshida, Liang Gao, Julio Navarro, Robert Thacker, Darren Croton, John Helly, John A. Peacock, Shaun Cole, Peter Thomas, Hugh Couchman, August Evrard, Joerg Colberg, Frazer Pearce Simula3on Tool: Gadget 2 (SPH) Visualiza3on Tool: Splotch Download video This movie shows the dark ma0er distribu3on in the universe at the present 3me, based on the Millennium Simula3on, the largest N- body simula3on carried out at the 3me (more than 10 10 par3cles). By zooming in on a massive cluster of galaxies, the movie highlights the morphology of the structure on different scales, and the large dynamic range of the simula3on. The zoom extends from scales of several Gpc down to resolved substructures as small as ~10 kpc.

The SPH formulation Introduction In this lecture we introduce: the basic concepts of SPH the concepts of the support and influence domains Problems: how to derive SPH formulations The formulation of SPH is usually divided into two main steps the kernel approximation (or integral representation) the discretized particle approximation

BASIC CONCEPTS (1/2) In the SPH method we use the following key ideas: 1. The problem domain is represented by a set of arbitrarily distributed particles and no connectivity of the particles is needed (i.e. meshfree). 2. We use an integral representation for the field functions and introduce a kernel approximation. It provides stability and has a smoothing effect. 3. The kernel approximation is then further approximated using particles. This is known as the particle approximation in SPH. Done by replacing the integral and its derivatives with summations over all corresponding values at the neighboring particles in a local domain called the support domain (compact support). Results in banded sparse matrices which can be solved efficiently κh

Basic concepts (2/2) 4. The particle approximation is performed at each time step, so particles depend on the current local distribution of particles (adaptive). Therefore, SPH naturally handles problems with large deformation. 5. The support domain must be sufficiently large and particles can be assigned mass and become physical material particles. 6. The particle approximations are performed on all field functions to produce a set of ODE's in discretized form with respect to time only (Lagrangian). Such equations are conceptually simpler than the Eulerian equivalent. 7. The ODE's are solved using an integration algorithm to achieve fast time stepping, and to obtain the time history of all the field variables for all the particles (dynamic). So our dynamical problem is meshfree, adaptive, stable, dynamic and Lagrangian. The detailed formulation follows! κh

Integral Representation of a field function (1 st main step, part I) The concept of the integral representation (or kernel approximation) of a function f(x): where f is a function of the position vector x, and δ(x - x') is the Dirac delta function and Ω is the volume of the integral that contains x. This is exact as long as f(x) is defined and continuous in Ω. Replace delta by a smoothing function W(x - x',h): (kernel approximation) where W is the smoothing kernel function or smoothing function or kernel for short. The smoothing length, h, defines the influence area of W. Note, the relationship is approximate, that s why we say kernel approximation.

This approximation is usually written with angle brackets as (1) The smoothing function is chosen to be an even function and it satisfies a number of conditions. Firstly, the normalization (or unity) condition: Secondly, the Delta function is recovered as the smoothing length approaches zero The third condition is the compact condition Where κ is a constant and defines the non-zero area of the smoothing function called the support domain. This condition localizes the support domain of the smoothing function. The kernel approximation is of 2 nd order accuracy if W is an even function. κh

We can show this by expanding f(x') around x using a Taylor series. From: where r are the higher order residuals. If W is an even function κh so Mesh-free computational fluid dynamics, NUI Galway. We neglect the residuals r which are of second order. If we had not used an even function for W then the error in the approximation could be larger.

Integral Representation of the derivative of a field function (1 st main step, part II) The approximation for the spatial derivative f(x) is obtained by simply substituting f(x) with f(x) in equation (1). Where the divergence in the integral is on the primed coordinate. Using the product rule [AB] = AB + A B Using this identity above The first integral on the RHS can be converted using the divergence theorem into an integral over the surface S of the domain of the integration Ω. where n is the unit vector normal to the surface.

Since the smoothing function W is compact the surface integral is just zero and vanishes. Note: this assumes the support domain does not overlap the problem boundary as this would be non-zero. So for points whose support domain is inside the problem domain we have (2) The spatial gradient of the field function can be calculated from the field function and the derivatives of the smoothing function W, rather than from the derivatives of the field function themselves.

Particle approximation (2 nd main step) Objects are represented by a finite number of particles that carry mass and occupy individual spaces. Done by applying a particle approximation, where the integrals (1) and (2) can be converted into forms with summation over all the particles in the support domain. If the infinitesimal volume dx' at the location of particle j is replaced by the finite volume of the particle ΔV j that is related to the mass of particles m j by: Where density ρ j is the mass per unit volume of the particle j(=1,2,3,,n) in which N is the number of particles j. The SPH representation for f(x) can be written in the particle approximation as (Particle approximation) or Particle approximation for the spatial derivative:

The particle approximations are normally written as: (note that the negative sign can be removed) The value of the function at particle i is approximated by using the average of the function at all particles in the support domain weighted by the smoothing function Similarly for the gradient of the function. The use of particle summation to approximate the integrals makes SPH simple and easy to implement. The particle approximation introduces mass and density into the equations. A simple way to calculate density in SPH is by summation density: Note the W ij has units of inverse volume.

Support domain and influence domain The support domain is where all points inside this domain are used to determine the information at point x. The influence domain is defined as the domain where a node (or particle in SPH) exerts its influence. The influence domain is associated with a node in meshfree methods and the support domain with any field point x. As SPH is a particle method that approximates field variables only on particles (or nodes) the support and influence domains are the same. For SPH the smoothing length h multiplied by the factor κ determines the support domain. As can be partially seen from the figure the smoothing length can vary both spatially and temporally. Dimensions and shapes of support domains for different points

Concluding remarks SPH is a particle based meshfree approach. There is no connectivity between the particles and only an initial particle distribution is needed. The SPH approximation consists of a kernel approximation in the continuum domain and a particle approximation in the support domain at the current time step. In the next lecture we will consider how to construct the smoothing functions introduced here.

Problems: How to derive SPH formulations 1) Using the product rule and the following vector derivative identity show that the following two identities hold f = ρ ρ f f ρ ρ 2 2) Substitute these two identities into the kernel approximation and apply the result of the particle approximation procedure to each gradient term to obtain the following results The above results are rather desirable as the field function appears in the form of paired particles. These expressions are more useful in practice, produce a symmetric central force between particles, conserve linear and angular momentum and allow consistent energy equations to be constructed. This is the form used by Monaghan (1992) ref. [5].