Вы находитесь на странице: 1из 28

Smoothed Particle Hydrodynamics

TUTORIAL I From Continuum to Particles

Geophysical
Pyroclastic ows Montserrat

Laboratory Experiments Monash University

Astrophysical Problems
The Turbulent Environment RCW 49

Green : gas Pink: dusty tendrils Blue: older stars

300 new stars !

Basic Ideas
1. Replace the continuum by discrete points.

2. Finite dierences uses xed grid points.

3. SPH - uses moving points -Particles.

SPH approximates the continuum while being a rigorous model of the underlying and more fundamental particle basis for the continuum.

molecules

continuum

Smoothed Particles

Why Particle Methods are Useful 1. The particle trajectories are the characteristics of the hyperbolic part of the equations.

dA A = + v A = F(A, A) dt t
2. Advection is exact. 3. Particle methods can easily handle complex physics. 4. Non dissipative uids modelled by Lagrangians. 5. The break up of a continuum into fragments - e.g. asteroid collisions, is seamless

Types of Particle Methods


Particle and Force (PAF Harlow) Particle in Cell (PIC Harlow) Flip (a PIC variant, Brackbill and Ruppel) Ephemeral Particle in Cell (EPIC Eastwood) Semi-Lagrangian Methods Smoothed Particle Hydrodynamics (SPH)

First task: How to use information at disordered particles

Particle Positions in an Equilibrium Toy Star


= (1 r 2 )

Random

Equal mass

m = (x)2

Integral Interpolants
Identity
A(r) = A(r ) (r r )dr

delta function Replace delta function by a kernel


AI (r) =

kernel

A(r )W (r r , h)dr

Properties of W(r,h)
The kernel is a member of a sequence which tends to the delta function
h0

lim W (r, h) = (r)

The kernel is normalized


W (r, h)dr = 1

An example (see also the spline kernels in the notes)


e W (r, h) = 3 3/2 h
r 2 /h2

h xes the resolution

Summation Interpolant
A(r ) W (r r , h)(r )dr (r )
mass element Fundamental formula
A(r) =
b

Ab mb W (r rb ) b

Ab mb W (r rb ) b

Density
(r) =
b

mb W (r rb , h)
mass conserved
mb W (r, h)dr =
b

and
(r)dr =
b

mb

normalized

Derivatives
If the kernel W is dierentiable then the interpolated function can be dierentiated exactly
As (r) Ab mb W (r rb ) b Ab mb W (r rb ) b

dierentiate
As (r)
b

better

1 A = ((A) A) 1 (A)a = a mb b (Ab Aa )W (ra rb , h) b

Density Convergence Equation


d = v dt d = ( (v) v ) dt d dt a = a mb b (vb va ) Wab b a Wab = rab Fab

CHOOSE = 1
d dt = a
a b

mb vab a Wab b

CHOOSE =
d dt =
a b

mb vab a Wab

Contribution of b to a

mb vab rab Fab


F <=0 <0 if a and b approaching approaching particles give positive contribution to density change

Accuracy
Sources of errors in the spatial derivatives

Integral interpolant. Summation interpolant. Interpolation points disordered.

Errors In The Integral Interpolant


AI (x) = A(x )W (x x , h)dx

Expand in a Taylor series about x


AI (x) = 1 A(x) + (x x)dA/dx + (x x)2 d2 A/dx2 + ...... W (x x )dx 2

Zero contribution for even W

O(h2 )d2 A/dx2

1 2 2 AI (x) = A(x) + h d A/dx2 + ... 2

second order error

Errors in the Summation Interpolant Key problem: disordered particles

Type of disorder not known. The disorder is related to the type of mechanical system we are trying to simulate and the form of the SPH equations

TOY STAR PARTICLES

Random

Equal mass SPH

Unequal mass SPH

Particles settling down in a Toy star

Schoenbergs splines
Schoenberg involved with ballistic data Data had errors Interpolate with smoothing

Example 1
M1 (q ) = 1 M1 (q ) = 0

; 0<q<1/2 ; otherwise

nearest grid point interpolation Example 2


M2 (q ) = 1 q M2 (q ) = 0

; 0<q<1 ;otherwise

witchs hat

Example 3

2 1 3 2 M4 (q ) = q + q 3 2 1 3 M4 (q ) = (2 q ) 6 M4 (q ) = 0

;0<q<1/2 ;1/2 < q < 3/2 ; otherwise

the second derivatives are continuous

Application to equi-separated points Interpolate a constant K


A = K (W (0, h) + 2W (, h) + 2W (2, h) + ....) h

should be K

M4 cubic spline
h= h = 1.2 h = 1.5

;A = K ;A =1.002K ;A = 1.004 K

Evolution of a square of water by Colagrossi

-1

-2

Summary

Can interpolate using disordered points. The interpolation gives dierentiable functions. The accuracy depends on the disorder. Shoenbergs splines provide useful smoothing interplants. Can easily estimate the gradients required for uid dynamics.

Вам также может понравиться