Top Banner
Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman (McMaster) Disks 2012, Heidelberg
30

Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Dec 18, 2015

Download

Documents

Adam Lyons
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Diffusion and accurate hydrodynamics

in SPH and grid codes

James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman (McMaster)

Disks 2012, Heidelberg

Page 2: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Test

Agertz et al 2007Code comparison

paper from the proto AstroSim conference (2004)

Gasoline(Wadsley,

Stadel & Quinn 2004)

Gadget(Springel)

FLASH

ENZO

ART

Page 3: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Test

Agertz et al 2007Code comparison

paper from the proto AstroSim conference (2004)

PPMPiecewiseParabolic

Method(Collela &

Woodward 1987)

SPHSmoothed

ParticleHydrodynamics

(Monaghan 1992, Springel & Hernquist 2002)

Page 4: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Basic Result: SPH blobs don’t break up

Quantitative measure: Fraction of cloud remaining above 64% of initial density

As cloud fragments – size R halves every Kelvin-Helmholtz time τKH ~ R/v -Effective Kelvin-Helmholtz time halves repeatedly until cloud catches up with flow (v 0)

SPH: Kelvin-Helmholtz time static

Page 5: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Basic Result: SPH blobs don’t break up

Immediate SPH issue: Surface Tension present in arithmetic sum Pressure force (e.g. Monaghan 1992, Gasoline, Gadget, …)

Suppresses Kelvin Helmholtz instabilities Issue first identified byRitchie & Thomas (2001)

Page 6: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

SPH Kelvin Helmholtz fixed

• Ritchie & Thomas (2001) – smooth pressure not density and Geometric Density Average in Force: remove surface tension (pressure spike at density jump)

• Price (2008) -- smear density jumps• Read, Hayfield & Agertz (2010), Read & Hayfield

(2011), Abel (2011), Murante et al (2011) … modified SPH

• Solutions typically expensive (more accurate)

Page 7: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Key to alleviating SPH surface tension:

• Geometric Density Average in Force (GDForce):Morris (1996), Monaghan (1992) Ritchie and Thomas (2001),Can be derived from a Lagrangian:Monaghan & Rafiee (2012)see also Abel (2011)

ababa

ba

bb

a WPP

mdt

dv

Standard Force Geometric Density Force

Merging Cluster Test

Page 8: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

Hi-Res ENZO

Hi-Res Standard SPH

Page 9: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

Hi-Res ENZO

Hi-Res GDForce SPH

Page 10: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

ENZO

GDForceSPH

StandardSPH

t = 1.25 τKH t = 3.75 τKH t = 2.5 τKH

Page 11: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

ENZO

GDForce SPH

StandardSPH

t = 1.25 τKH t = 3.75 τKH t = 2.5 τKH

Low Entropy Blobs Indestructible!

Page 12: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

The second issue: Entropy mixing

Cluster Comparison (Frenk et al 1999)

Grid codes have entropy cores, SPH codes don’t (because they don’t mix)

ENZO

SPH

Wadsley, Veeravalli & Couchman (2008)

Page 13: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

How to get entropy cores?

• Shocks (while cs<v)• Mix hot & cold cluster gas

SPH can’t:

Eulerian codes can (accidentally):

flowfollowing

constPsAu

dt

du

.)()v.( )1(

)v.( )1(.v

uerrors

advectionu

t

u

Page 14: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Subgrid Turbulent Mixing

• Fluid elements on a fixed (resolved) physical scale do exchange energy/entropy due to unresolved (turbulent) motions

0 part, unresolved

, field ofpart (filtered) resolved where

v).()v.( )1(.v.v

togoes )v.( )1(.v

aa

aa

uuuut

u

uut

u

Turbulent diffusive heat flux

Page 15: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Ways to model turbulent diffusion:

• Lowest-order turbulent diffusion model:

Turb has units of velocity x lengthSmagorinksy model (1963):

Assumes Prandtl number ~ 1 Sij = strain tensor of resolved flow, lS Smagorinsky lengthIncompressible grid models set ls

2 ~ 0.02 x 2 (Lilly 1967)

For SPH we can try Turb = C h2 S C ~ 0.1

ijijSTurb SSSSl ,2

uuut

u

Turb )v.()1(.v

Wadsley, Veeravalli & Couchman (2008) Shen, Wadsley & Stinson (2010)

Page 16: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Ways to model turbulent diffusion:

• Lowest-order turbulent diffusion model:

uuut

u

Turb )v.()1(.v

Wadsley, Veeravalli & Couchman (2008) Shen, Wadsley & Stinson (2010)

Cluster Entropy Cores easily obtained in SPH with thermal diffusion included – solved in 2008

Page 17: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Bottom Line on Diffusion & SPH• Physical diffusion in needed in all simulations

e.g. Metals should mix in galactic outflows (Shen, Wadsley & Stinson 2010)

With thermal diffusion in SPH:• Get entropy cores in Galaxy Clusters• Necessary to model entropy of mixing (Springel 2010)• Better Kelvin-Helmholtz• Better Blob results … (but not quite there)

• … Need Geometric Density Force AND Diffusion

Page 18: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

Hi-Res ENZO

GDForce + Turbulent Diffusion SPH

Page 19: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob Test in Entropy (T3/2/ρ)

ENZO

GDForce +TurbulentDiffusionSPH

StandardSPH

t = 1.25 τKH t = 3.75 τKH t = 2.5 τKH

Page 20: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Is grid (PPM) the right answer?No: Numerical Diffusion Approximate,

e.g. is not Galilean Invariant

ENZOMoving flow

t = 1.25 τKH t = 3.75 τKH t = 2.5 τKH

ENZO1/2 – 1/2

ENZOMovingblob

Page 21: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob’s falling apart…

t / τKH

Den

se C

loud

Re

mai

ning

GDForce + Diffusion Coefficient 0.1,0.03,0.01

Standard SPHStandard SPH + DiffusionGDForce SPH

Page 22: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob’s falling apart… (Log)

t / τKH

Den

se C

loud

Re

mai

ning

GDForce + Diffusion Coefficient 0.1,0.03,0.01

Standard SPHStandard SPH + DiffusionGDForce SPH

Page 23: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Blob’s falling apart… (Log)

t / τKH

GDForce + Diffusion Coefficient 0.1,0.03,0.01

Standard SPHStandard SPH + DiffusionGDForce SPHENZO (1/2 each)ENZO Moving blobENZO Moving flow (Agertz et al.)D

ense

Clo

ud

Rem

aini

ng

Page 24: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Diffusion coefficient…Smash galaxy clusters together: Clean version of Frenk et al. ( 1999) with no substructure

Results look the same but ENZO mixes more in the core (see left) than SPH+GDForce+DiffusionGasoline diffusion coefficients:

Also: Mass metallicity + IGM Metals Inner 100 kpc

ENZO @ 4.5 Gyr

GASOLINE @ 4.5 Gyr

ENZO

1.0 0.1, 0.03, 0.01, no Diffusion

500 pc

Gasoline

Entr

opy

at 2

0 G

yr

Page 25: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Diffusion coefficient…Smash smooth galaxy clusters together: Clean version of Frenk et al. ( 1999) with no substructure

Results look the same but ENZO mixes more in the core (see left) than SPH+GDForce+DiffusionGasoline diffusion coefficients:

Also: Mass metallicity + IGM Metals Inner 100 kpc

ENZO @ 4.5 Gyr

GASOLINE @ 4.5 Gyr

ENZO

1.0 0.1, 0.03, 0.01, no Diffusion

500 pc

Gasoline

Entr

opy

at 2

0 G

yr

Page 26: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Galaxy Formation:Kaufmann et al (2008) blobs no more

Toy Galaxy Model (cf. Kaufmann et al.), 20 kpc wide edge on viewConclusion: Blobs product of SPH surface tension effects(see also: Joung et al 2011)

Standard SPH GDForce+Diffusion SPH

Page 27: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Galaxy Formation:Smoother disks & spiral structure

Toy Galaxy Model (cf. Kaufmann et al.), ~ 12 kpc wide face on viewSmoother Structure

Standard SPH GDForce+Diffusion SPH

Page 28: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Galaxy Formation

1011 Solar Mass Galaxy, z=0.6 (latest output)Initial indications: Cold flow mass only ~ 2% differentIncreased star formation. Need to understand how marginally resolved cooling works

Standard SPH GDForce+Diffusion

Page 29: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Conclusions

• Geometric Density Average Force alleviates surface tension affects in SPH

• Well-characterized diffusion treatments necessary for all codes (SPH & Grid)

• Careful attention to resolution scale behaviour important (e.g. Instabilities: KH, Jeans, Thermal/Cooling…)

• Gasoline public release: including corrected force (blob free!), Stinson et al. star formation and feedback, cooling, planetesimal collisions – coming to google code this summer…

Page 30: Diffusion and accurate hydrodynamics in SPH and grid codes James Wadsley (McMaster) Tom Quinn (Washington), Fabio Governato (Washington), Hugh Couchman.

Sedov Test GDForce