17
Ryuji Morishima (UCLA/JPL) Implementation of MVS integrators to cosmological N-body codes

Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Embed Size (px)

Citation preview

Page 1: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Ryuji Morishima (UCLA/JPL)

Implementation of MVS integrators to cosmological N-

body codes

Page 2: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

N-body code: Gravity solver + IntegratorGravity solver must be fast and handle close

encountersSpecial hardware (N2): Grape, GPS Tree (N log N): PKDGRAV, Gadget

Integrator must take a large time step with good accuracy Bulirsch-StoerHermite: often used with GrapeMixed Variable Symplectic (MVS) integrators:

SYMBA, MercuryThis work: Implementation of SYMBA to PKDGRAV

N-body codes for planet formation

Page 3: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Developed by Stadel (2001)Source is open in The astro-code wikiTree gravity: 4th order multiple moments Adaptive to various parallel

environments (shared memory, mpi)Different functions and integrators

Collisions (Richardson et al. 2000)SPH (Wadsley et al. 2004)Fragmentation (Leinhardt & Richardson

2005)SYMBA integrator (Morishima et al. 2010)

Cosmological N-body code PKDGRAV

Page 4: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Multi-pole expansion

Up to 4th order (Hexadecapole)

Error estimation from cosmological simulations

Page 5: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Tree build

k-D Tree

Spatial binary tree

Spatial binary tree can reduce the higher order multi-pole momentsIt is also as efficient as k-D tree in neighboring search.

Page 6: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Parallel architectureMater layer• Controls overall

flows of program

Processor Set Tree (PST) layer • Assigns tasks to

processors

Parallel KD layers • Executes tasks in each

core

Machine dependent layers • Interface to parallel

primitives (e.g. MPI)

call

One needs to understand PST format but not parallel primitives such as MPI

call

Page 7: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Mixed variable symplectic integrator

Specialized for systems with a massive central bodyMixed variables: Cartesian and Keplerian co-

ordinates A large time step along Keplerian orbitTime-reversible (no secular error)

Handling close encounters: SYMBA (Duncan et al. 1998)Mercury (Chambers 1999)

Most of N-body simulations for planet formation have been performed by these two codes in last decade

But both codes use N2 gravity calculations

Page 8: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Democratic co-ordinateHeliocentric position + barycentric velocity

SYMBA (Symplectic Massive Body Algorithm)

Hkep>>Hint (if there is no close encounter)Hkep>>Hsun

Page 9: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Potential (or Force) decomposition based on mutual distance normalized by the Hill radius

A higher order potential component is calculated with a small block-sized time step

Multiple time step in close encounters

Kick (F0) Kick (F0)

Kepler Drift with F1

Page 10: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

The time step size needs to be determined by the minimum mutual distance during particle drift.

This distance must be estimated by using particle co-ordinates at the beginning and ending of particle drift symmetrically (e.g. Hut et al. 1995).

For time reversibility…

Page 11: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

1. Half kick (t0/2) due to Sun’s motion

2. Half Kick (t0/2) due to force F0 from other particles

3. Kepler drift (t0) for all particles

4. Tree build and neighboring search (after drift)5. Particles in close encounters

1. Sent back to pre-drift positions and velocities2. Put into a single core (domain decomposition)3. SYMBA multiple time stepping 4. Collisions are also handled here

6. Tree build and gravity calculation and neighboring search (before drift)

7. 2 and 1

Loop for PKDGRAV-SYMBA

Page 12: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Example (Morishima et al. 2013, EPSL 366)

With gas

Without gas

Page 13: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Evolution of De

Martian meteorites

Accretion truncated at 14 My

Accretion Extrapolated

Page 14: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Energy conservation (Mtot =3 MEarth, N = 100, a = 1.0-1.3 AU, Dt = 6 days)

Page 15: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

Scaling with particle number

Page 16: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

In 3-body encounter, time stepping of these 3 bodies is synchronized (for time symmetry)

If the system’s number density is high, all particles share the time step….

Multi-body encounter and chain of encounters

Page 17: Ryuji Morishima (UCLA/JPL). N-body code: Gravity solver + Integrator Gravity solver must be fast and handle close encounters Special hardware (N 2 ):

PKDGRAV-SYMBA works as desired unless the system’s number density is so high that most of bodies are in multi-body encounters.

For such systems, time symmetry needs to be sacrificed?

Summary