Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics •...

82
Smoothed Particle Hydrodynamics 2 nd -3 rd Aug. 2014 Takayuki Saitoh

Transcript of Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics •...

Page 1: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Smoothed Particle Hydrodynamics

2nd-3rd Aug. 2014Takayuki Saitoh

Page 2: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 3: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

PART 1Theory

Page 4: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 5: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

What is SPH?• SPH is a Lagrangian scheme of fluid

dynamics developed by Lucy (1977) and Gingold & Monaghan (1977)– Solve evolution of fluid elements– Fluid quantities are evaluated via the

convolution of particles

Muller+’03 SIGGRAPH Saitoh et al.

~cm scale  ~1022cm scale 

Page 6: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Advantages of SPH• Advantages

– Galilean invariance– Suitable for simulations with a wide dynamic

range because of Lagrangian nature– High density regions have high resolution

Page 7: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Governing Equations of Compressive fluid

• Continuity equation

• Momentum equation

• Energy equation

• Equation of state

Page 8: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Derivation of SPH (1)• Physical quantity, f, at x is

• Applying the kernel approximation, this equation becomes

• Here, W is the compact support function which is reduced to δ when h0

Page 9: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Derivation of SPH (2)• Spatial derivation is

Page 10: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Kernel Function• Kernel function should be

1. normalized unity2. the compact support3. reduced to the δ function when h0

• The cubic spline function is the widely used as the kernel function:

Page 11: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Accuracy• Consider the Taylor exp. of f and

substitute it into the f(r)

• If the kernel function is an even function, we have

• SPH is the second order scheme

Page 12: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Fundamental Equation of SPH

• Discretize the kernel approximated equations using the volume element drʼ = m/ρ

• Substituting f = ρ, we have

In standard SPH, every quantities evaluate using this ρ

Page 13: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (1)• Lagrangian:

• Constraint:

Page 14: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (2)• Euler-Lagrange Equation:

Page 15: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (3)• Solve the last half (h1,h2,…,hN),

Page 16: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (4)• Combining these two equations, we get

• Solving this eq. for λ, we have

Page 17: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (5)• Solve the fist half (r1,r2,…,rN):

Page 18: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Equation of Motion (6)•

• Then, we have

Page 19: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Energy Equation (1)• When you choose the internal energy as

the independent thermodynamics variable, you need the energy equation.

• Energy equation can be obtained from the fist law of thermodynamics:

Page 20: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Energy Equation (2)• Time derivative of the density is

• Rearranging this eq., we get

Page 21: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Energy Equation (3)• Again, rearranging the eq., we obtain

• Finally, we have

Page 22: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Summary of SPH eqs.

Page 23: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other SPH eqs. (1)• With other const.:

Page 24: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other SPH eqs. (2)• The conventional set of SPH equations:

Page 25: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Problem in SPH• SPH cannot deal with

contact discontinuities, resulting in suppression of fluid instabilities (Agertz+2007)– The reason is that the

standard formulation of SPH uses differentiability of density

SPH Grid

Page 26: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Hydrostatic Equilibrium test

ρ=1

ρ=4

Initially hydrostatic equilibrium

Saitoh & Makino 2013

Page 27: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Pressure at Contact Discon.

• Density over(under) estimate Error in pressure (=repulsive force) Suppression of mixing

• We should reconstruct SPH with different way in order to avoid differentiability of density

27

Underest.Overest.

Density Pressure

Saitoh & Makino 2013

Page 28: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Density Independent SPH• Since pressure is the smooth quantity at

the contact discontinuity, we use the differentiability of pressure (energy density) (See Saitoh & Makino 2013).

Page 29: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Formulation of Density Independent SPH

• We use a new volume element:

• Physical quantity f is

• Substituting q into f, we have

29The value q is proportional to P in an ideal-gas

Saitoh & Makino 2013

Page 30: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Summary of DISPH eqs.

Page 31: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other DISPH eqs. (1)• With other const.:

Page 32: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other DISPH eqs. (2)• The conventional set of SPH equations:

Page 33: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Pressure at Contact Discon. with DISPH

Since we use pressure as the fundamental quantity,we have smooth pressure at the contact discon.

Page 34: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Hydrostatic Equilibrium test

34

SPH DISPH

Saitoh & Makino 2013

Page 35: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Our SPH

Standard SPH

Initial condition

Page 36: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Generalized DISPH• We can use y=Pζ, instead of q(=P/(γ-1))

– Note that, when ζ=1, these equations are reduce to the original DISPH

• See Saitoh & Makino (2013)

36

DISPH for Non-ideal EOS• Non-ideal EOS is important for geophysical

applications to express mantle, iron core, etc.– P=P(ρ,u)

• We directly use P as a fundamental quantity.• See Hosono, Saitoh and Makino (2013)

Page 37: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 38: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Artificial Viscosity• In order to handle shocks, we introduce

the artificial viscosity terms for momentum and energy equation.

• Following Monaghan 1997, we use

Page 39: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Artificial Viscosity (2)• The contributions of the artificial

viscosity to the momentum and energy equations are as follows:

Page 40: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Balsara Limiter• In order to suppress the shear viscosity,

we use the Balsara Limiter (Balsara1995):

where csi = sound speed and εb = 1.e-4.• Πij Πij

Balsara:

Page 41: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Time integration:Leapfrog

n n+1/2 n+1

position

velocity

acc

1. Kick 3. Kick

2.Drift

Page 42: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Time Integration:Leapfrog

n n+1/2 n+1

position

velocity

Acc

1. Kick 3. Kick

2.Drift

Page 43: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Time Integration:Internal Energy

n n+1/2 n+1

position

velocity

acc

1. Kick 3. Kick

2.Drift

U

dU/dt

1. Kick

2. Predict

3. Kick

Page 44: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Time Integration:Internal Energy

n n+1/2 n+1

position

velocity

Acc

1. Kick 3. Kick

2.Drift

U

du/dt

1. Kick

2. Predict

3. Kick

Page 45: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Time step• The Courant-Friedrichs-Lewy (CFL)

condition is used for the evaluation of time step dt:

where CCFL~0.1 and

and βsig ~ 1.

Page 46: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Kernel size• Two ways to determine the kernel size

– Constant neighbor number

– Use density:

• The tree algorithm (Barnes & Hut 1986) is widely used for the neighbor particles search

Page 47: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Exercises• Get Equations in Pages 23, and 24• Get Equations in Pages 30, 31, and 32

– Hint: See Saitoh & Makino (2013) and Hopkins (2013)

Page 48: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

PART 2Practics

Page 49: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 50: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

ASURA(Subset version)• is an SPH code written in lang C (C99)

– ASURA is originally developed for simulations of galaxy formation

– I wrote it as simple/clear as I can. Hope it help your understanding.

• is parallelized by OpenMP• can run both DISPH and SSPH just

selecting a flag in the input parameter file.• includes standard benchmark tests.• A separate program for visualization via

PGPlot is included.

Page 51: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

License• This version of ASURA is distributed

under the MIT License.• http://opensource.org/licenses/MIT

Page 52: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Directory structure• src : source code• runs : work directory

– shocktube : 1D shocktube– hydrostatic : 2D hydrostatic– kh:Kelvin-Helmholtz inst.– rt:Rayleigh-Taylor inst.

• plot:plot tool• doc:Documents generated by DoxyGen

Page 53: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Compile• ASURA requires only “gcc”

– cd ./src– make– Then, we have “asura.out”

Page 54: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

How to run• Copy the binary file at “src/asura.out” to

the directory in which the parameter file is included.– e.g., cp ./src/asura.out ./runs/shocktube

• Exec. the binary “./asura.out”– ASURA automatically reads the parameter

file, integrates the system and writes the data with the interval set in the parameter file.

Page 55: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Parameter file “param.txt”

Page 56: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 57: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Shock tube tests• Shock tube test is the standard

benchmark test for the compressive fluid.

• This test shows the shock-capturing ability of schemes.

x

Page 58: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Run shock tube tests• Working directory: ./runs/shocktube• Letʼs try following two case:

– UseDISPH 1 and ./data_disph– UseDISPH 0 and ./data_ssph

Page 59: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Compile plot program• Plot program requires “gcc” and “pgplot”

– cd ./plot– make– Then, we have “plot.out”

Page 60: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Parameter file for plot• Parameters are

defined in param.txt– DataDir_0? are the

path to the data dir– PlotType selects

output data type– OutDir is the directory

to save the output data (eps/png files)

Page 61: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Shocktube: DISPH• Shocktube test (runs/shocktube)

Page 62: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Shocktube: SSPH• Shocktube test (runs/shocktube)

Page 63: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Hydrostatic Equilibrium tests

• SSPH has unphysical repulsive force at the contact discontinuity.

• To understand the resultant of this force, we study the evolution of the hydrostatic equilibrium system.

ρ=1

ρ=4

Page 64: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Change Kernel function• You can use following 5 types of kernel

functions:– Cubic spline kernel (Schoenberg 1946)– Cubic spline kernel with the Thomas &

Couchman (1992) modification– Wendland kernel C2, C4, and C6 (Dehnen &

Aly 2012)• Select one of them via

“SelectKernelType” in the param.txt

Page 65: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Run Hydrostatic Equilibrium tests

• Working directory: ./runs/hs• Letʼs try following four case:

– UseDISPH 1, SelectKernelType 1 and ./data_disph

– UseDISPH 0, SelectKernelType 1 and ./data_ssph

– UseDISPH 1, SelectKernelType 2 and ./data_disph_WC2

– UseDISPH 0, SelectKernelType 2 and ./data_ssph_WC2

Page 66: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Run Hydrostatic Equilibrium tests

• Working directory: ./runs/hs• Letʼs try following four case:

– UseDISPH 1, SelectKernelType 1 and ./data_disph

– UseDISPH 0, SelectKernelType 1 and ./data_ssph

– UseDISPH 1, SelectKernelType 2 and ./data_disph_WC2

– UseDISPH 0, SelectKernelType 2 and ./data_ssph_WC2

Page 67: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Plot Hydrostatic: SelectKernelType 1

• Hydrostatic tests (run/hydrostatic)

Page 68: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Plot Hydrostatic: SelectKernelType 2

• Hydrostatic tests (runs/hydrostatic)• Wendland Kernel C2

Page 69: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Kelvin-Helmholtz instability tests

ρ=2, P=2.5

ρ=1, P=2.5

ρ=1, P=2.5

0.5

-0.5

-0.5

• Shear origin fluid instability

• Init. density diff.: 1:2, Pinit=2.5, vrelative=1

• Velocity perturbation is imposed on the interface

Page 70: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Run Kelvin-Helmholtz instability tests

• Working directory: ./runs/kh• Letʼs try following 2 cases:

– UseDISPH 1, and ./data_disph– UseDISPH 0, and ./data_ssph

Page 71: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Plot Kelvin-Helmholtz inst

• Kelvin-Helmholtz inst. tests (runs/kh)

Page 72: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Rayleigh-Taylor instability tests

• Gravity induced fluid instability

• Init density ratio at y=0.5 is 1:2

• Velocity perturbation is imposed on the interface

Gravity

DensityEntropy

Page 73: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Run Rayleigh-Taylorinstability tests

• Working directory: ./runs/rt• Letʼs try following 2 cases:

– UseDISPH 1, and ./data_disph– UseDISPH 0, and ./data_ssph

Page 74: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Plot Rayleigh-Taylor inst.

• Rayleigh-Taylor inst. tests (runs/rt)

Page 75: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Exercises• Change “Nparticles” and “Ns” in

param.txt and compare the results• Check conservation of total energy, total

momentum, and total angular momentum.– Check these values and compare them with

their initial values.

Page 76: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

PART 3References

Page 77: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Contents1. Theoretical part

– Principle of Smoothed particle hydrodynamics• Standard formulation of SPH• Density Independent SPH

– Artificial viscosity, time integration, time step2. Practical part

– Brief explanation of ASURA– Benchmark tests

• 1D shock tube test• 2D hydrostatic equilibrium test• 2D Kelvin-Helmholtz instability test• 2D Rayleigh-Taylor instability test

3. References

Page 78: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Original papers • Lucy, AJ, vol. 82, p. 1013-1024, 1977• Monaghan & Gingold, MNRAS, vol. 181,

p. 375-389, 1977

Page 79: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Reviews• Monaghan, ARAA. Vol. 30 p. 543-574,

1992 • Monaghan, RPPh, Vol. 68, p. 1703-1759,

2005• Rosswog, New A. Reviews, Vol. 53, p.

78-104, 2009• Springel, ARAA, vol. 48, p.391-430,

2010

Page 80: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other Important Papers• Hernquist & Katz, ApJ Supplement Series,

vol. 70, p. 419-446, 1989• Ritchie & Thomas, MNRAS, Vol. 323 p.

743-756, 2001• Springel & Hernquist, MNRAS, Vol. 333 p.

649-664, 2002• Price, JCoPh, Vol. 227, p. 10040-10057• Read et al., MNRAS, Vol. 405 p. 1513-1530,

2010

Page 81: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Other Important Papers• Cullen & Dehnen, MNRAS, Vol. p. 669-683,

2010• Dehnen & Aly, MNRAS, Vol. 425, p. 1068-

1082, 2012• Saitoh & Makino, ApJ, Vol. 768, article id.

44, 2013• Hopkins, MNRAS, Vol. 428, p.2840-2856,

2013• Hosono, Saitoh & Makino, PASJ, Vol.65,

Article No.108, 2013

Page 82: Smoothed Particle Hydrodynamics - CfCA · – Principle of Smoothed particle hydrodynamics • Standard formulation of SPH • Density Independent SPH – Artificial viscosity, time

Misc.• Balsara, JCoPh, Vol. 121, p.357-372,

1995• Monaghan, JCoPh, Volume 136, p. 298-

307, 1997• Saitoh & Makino, ApJ Letters, Vol. 697,

p. L99-L102, 2009• Saitoh & Makino, PASJ, Vol.62, p.301-

314, 2010