Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet...

34
Using particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing Planetesimal formation Conclusions Using particle-mesh methods to study planet formation Anders Johansen (Lund Observatory) Computational Physics with GPUs Lund Observatory, November 2010

Transcript of Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet...

Page 1: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Using particle-mesh methodsto study planet formation

Anders Johansen (Lund Observatory)

Computational Physics with GPUs

Lund Observatory, November 2010

Page 2: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Planet formation

Planetesimal hypothesis of Safronov 1969:

Planets form in protoplanetary discs from dust grains that collideand stick together to form ever larger bodies

1 Dust to planetesimalsµm → cm: contact forces during collision lead to stickingcm → km : ???

2 Planetesimals to protoplanetskm → 1,000 km: gravity

3 Protoplanets to planetsGas giants: 10 M⊕ core accretes gas (< 107 years)Terrestrial planets: protoplanets collide (107–108 years)

Page 3: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Overview of planets

Protoplanetary discs

Dust grains

Pebbles

Gas giants andice giants

Terrestrial planets

Dwarf planets+ Countless asteroids and Kuiper belt objects+ Moons of giant planets+ More than 500 exoplanets

Page 4: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Recipe for making planets?

Hydrogen and Helium (98,5%)

Dust and ice (1,5%)

Coagulation (dust growth)

⇒ Planets?

(Paszun & Dominik)

(Blum & Wurm 2008)

µm

mm

Page 5: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Recipe for making planets?

Hydrogen and Helium (98,5%)

Dust and ice (1,5%)

Coagulation (dust growth)

⇒ Planets? No

“Meter barrier”

Growth by coagulation to mm or

cm, but not larger

The problem: small dust grains stick

readily with each other – sand,

pebbles and rocks do not

⇒ Additional physics needed

(Paszun & Dominik)

(Blum & Wurm 2008)

µm

mm

Page 6: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Particle dynamics

Gas accelerates solid particles through drag force:

∂w∂t = . . .− 1

τf(w − u)

@@@I

Particle velocity @@I

Gas velocity

The friction time is (Weidenschilling 1977)

τf =a•ρ•csρg

(valid for particles smaller than the mean free path)

a•: Particle radius

ρ•: Material density

cs: Sound speed

ρg : Gas density

Important nondimensional parameter in protoplanetary discs:

ΩKτf (“Stokes” number)

At r = 5 AU in MMSN we have a•/m ∼ 0.3ΩKτf .

Page 7: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Two-way drag forces

Drag forces must conserve momentum, so momentum lost orgained by the particles comes from the gas:

∂w

∂t= . . .− 1

τf(w − u)

∂u

∂t= . . .− ρp/ρg

τf(u−w)

ρg∂u

∂t+ ρp

∂w

∂t= 0

Simple enough for a dust fluid, but what if the gas is afluid and the dust are superparticles?

Two-way drag force particle-mesh scheme in collaborationwith Andrew Youdin at CITA(Youdin & Johansen 2007; Johansen & Youdin 2007)

Page 8: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Streaming instability

Gas orbits slightly slower than Keplerian

Particles lose angular momentum due to headwind

Particle clumps locally reduce headwind and are fed byisolated particles

v η(1− )Kep

FFG P

Johansen, Henning, & Klahr (2006); Youdin & Johansen (2007); Johansen & Youdin (2007);Johansen et al. (2007, Nature); Johansen et al. (2009)

Youdin & Goodman (2005): “Streaming instability”

Page 9: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Particle-mesh drag force

1 Interpolating gas velocities at particle positions

u(x(i)) =∑j

WI(x(i) − x(j))u(j)

Particle i HHYGrid point j

2 Calculating the drag force on particles

f(i)p = − 1

τf

[v(i) − u(x(i))

]3 Assigning the back-reaction force to the gas from particles

in nearby cells

f(j)g = − mp

ρ(j)g Vcell

∑i

WA(x(i) − x(j))f(i)p

Page 10: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Assignment/interpolation functions

Three common interpolation/assignment functions:(see book by Hockney & Eastwood 1984)

Nearest Grid Cloud In Triangular ShapedPoint (NGP) Cell (CIC) Cloud (TSC)

Important to use same function for interpolation and forassignment, to avoid spurious sub-grid accelerations.

Page 11: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Which assignment scheme to choose?

NGP: Particle couples with nearest grid pointAdvantage: FastDisadvantage: No linear phase!

CIC: Particle couples with 8 nearest grid pointsAdvantage: Faster than TSCDisadvantage: Need at least two particles per grid point

TSC: Particle couples with 27 nearest grid pointsAdvantage: Catches linear behaviour with only one particle pergrid pointDisadvantage: Slow

−3.0 −2.0 −1.0 0.0 1.0 2.0 3.0x

−1•10−6

−5•10−7

0

5•10−7

1•10−6

δρp

Page 12: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Streaming instability movie

Linear and non-linear evolution of meter-sized boulders(ΩKτf = 1) with a background solids-to-gas ratio of 0.2:

t=40.0 Ω−1

−20.0 −10.0 +0.0 +10.0 +20.0x/(ηr)

−20.0

−10.0

+0.0

+10.0

+20.0

z/(

ηr)

t=80.0 Ω−1

−20.0 −10.0 +0.0 +10.0 +20.0x/(ηr)

−20.0

−10.0

+0.0

+10.0

+20.0

z/(

ηr)

t=120.0 Ω−1

−20.0 −10.0 +0.0 +10.0 +20.0x/(ηr)

−20.0

−10.0

+0.0

+10.0

+20.0

z/(

ηr)

t=160.0 Ω−1

−20.0 −10.0 +0.0 +10.0 +20.0x/(ηr)

−20.0

−10.0

+0.0

+10.0

+20.0

z/(

ηr)

The radial drift flow of solids is linearly unstable!(Youdin & Johansen, Johansen & Youdin, ApJ, 2007)

Page 13: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Clumping in 3-D

3-D evolution of the streaming instability:

DiscSimulation box

Particle clumps have up to 100 times the gas densityClumps dense enough to be gravitationally unstableBut still too simplified:

⇒ no vertical gravity and no self-gravity⇒ single-sized particles

Particle size:

30 cm @ 5 AU or 1 cm @ 40 AU

Page 14: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Poisson equation

A new term in the equation of motion:

∂u

∂t+ (u ·∇)u = −∇Φself −∇Φext +

1

ρJ× B− 1

ρ∇P

Self-potential Φself comes from solving Poisson equation:

∇2Φself = 4πGρ

Here ρ is the gas density, but may include the density of a dustfluid ρd or dust particles ρp as well.

Must solve elliptical partial differential equation at each(sub-) timestep

Page 15: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Fast Fourier Transform method

Solution of Poisson equation in 3-D periodic space:

Φ(k) = −4πG ρ(k)

k2

FFT method works on equidistant grid with periodicboundary conditions– Suitable for shearing sheet (with some slightmodifications)

Need to do lots of parallel FFTs– Actually the transpositions are expensive, not the FFTitself (which only costs ∼ 3log2Nx operations per gridpoint)– Each transposition involves the transfer of (almost) allgrid points to another thread

(Johansen et al. 2007)

Page 16: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

High-resolution studies

Jugene @ Julich: IBM Blue Gene/P with 294,912 cores

Third fastest computer on the planet

5 rack months (1 rack = 4096 cores)

High resolution studies of planetesimal formation (5123)

Question: What is the Initial Mass Function of planetesimals?

Page 17: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Timings

Pencil Code

⇒ High ordersymmetric finitedifference code

⇒ Optimised forsubsonic andtransonic flows

⇒ Handleshydrodynamics,magnetohydrody-namics and particledynamics

⇒ Parallelised usingMPI

Page 18: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Grid discretisation

Page 19: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Parallelisation of Pencil Code

Page 20: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Ghost zones

Page 21: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

With particles

Page 22: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Problem with load balancing

Page 23: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Block decomposition

Goal for perfect load balancing:

Get equally many grid points and equally many particles on eachprocessor

Secondary goal: leave gas grid domain decomposition ofPencil Code unchanged

Solution: Particle Block Domain Decomposition

Domain decompose grid points as usual

Count particles in blocks of 4× 4× 4 grid points

Distribute blocks to processors so that each processor getsapproximately the same number of particles

(Johansen et al., A&A submitted)

Page 24: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Particle Block Domain Decomposition

Proc 0: 0/3725Proc 1: 0/6226Proc 2: 15983/6032Proc 3: 4017/4017

−0.10 −0.05 0.00 0.05 0.10−0.10

−0.05

0.00

0.05

0.10

Proc 0

Proc 1

Proc 2

Proc 3

Page 25: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Particle Block Domain Decomposition

Proc 0: 0/5378Proc 1: 9978/5129Proc 2: 10022/5377Proc 3: 0/4116

−0.10 −0.05 0.00 0.05 0.10−0.10

−0.05

0.00

0.05

0.10

Proc 0

Proc 1

Proc 2

Proc 3

Page 26: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Timings and speed with and without PBDD

Test problem with 2563

grid points and 8× 106

particles

Particles sediment to themid-plane of the disc

Normal domaindecomposition quicklybecomes unbalanced andslows down by 5–6

Particle Block DomainDecompositionmaintains goodloadbalancing as eachthread has approximatelysame particle number

Page 27: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Magnetorotational instability

Magnetorotational instability likely source of turbulenceand accretion in protoplanetary discs where the degree ofionization is sufficient (Balbus & Hawley 1991; talk by Jim Stone on Friday)

Disc

Simulation box

Page 28: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Convergence test for pressure bumps

Page 29: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Particle concentration

2563 with 8× 106

particles

5123 with 64× 106

particles

Page 30: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Forming planet embryos

Page 31: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Planetesimal collisions

Page 32: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Planetesimal formation at 5123 resolution

(Johansen, Klahr, & Henning, A&A, submitted)

Page 33: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

Planetesimal formation at 5123 resolution

(Johansen, Klahr, & Henning, A&A, submitted)

Page 34: Using particle-mesh methods to study planet formationUsing particle-mesh methods to study planet formation Anders Johansen Planetesimal formation Drag force and self-gravity Load balancing

Usingparticle-meshmethods tostudy planetformation

AndersJohansen

Planetesimalformation

Drag force andself-gravity

Loadbalancing

Planetesimalformation

Conclusions

The “clumping scenario” for planetesimal formation

1 Dust growth by coagulation to a fewcentimeters or meters

2 Particle concentration in pressure bumpsand through streaming instabilities

3 Gravitational collapse to 100–1000 kmscale planetesimals