Kinetic Plasma Simulations in Astrophysics Lorenzo Sironi
Outline Plasma physics in astrophysics. The Vlasov-Maxwell system. Fully-kinetic particle-in-cell codes. 1. Electrostatic codes. 2. Electromagnetic codes. Hybrid particle-in-cell codes. Astrophysical applications.
Time and length scales Characteristic time and length scales " skin = c /# p skin depth " c = eb mc Larmor Full kinetic models Hybrid models Fluid models MHD
Time and length scales Characteristic time and length scales " skin = c /# p skin depth " c = eb mc Larmor Full kinetic models Hybrid models Fluid models MHD [credit: A. Spitkovsky]
Binary vs collective effects Number of particles in Debye sphere If ND 1, binary interactions ( collisions ) are important. If ND 1, collective effects dominate. Most astrophysical plasmas have ND 1.
Kinetic plasma simulations
Lagrangian vs Eulerian LAGRANGIAN: observe/follow the motion of an individual element (fluid parcel, particle) as it moves through space and time. EULERIAN: focus on specific locations in space through which the various elements (fluid parcels, particles) pass in time.
The Vlasov equation LAGRANGIAN EULERIAN Collisionless Vlasov equation: i.e., conservation of the phase space density along characteristics (Liouville s theorem) The fluid equations follow from Vlasov equation (but closure problem!)
VLASOV { MAXWELL The Vlasov-Maxwell system
How to solve the Vlasov equation? Two options: Discretize the Vlasov equation on a grid in phase space: 1. computationally expensive to solve in 6+1 dimensions 2. how to determine the boundaries of the grid in momentum space? 3. what if f<0? Sample the phase space density with particles, and follow them as LAGRANGIAN tracers. PIC codes in a nutshell:
Super-particles vs real particles VLASOV - MAXWELL PIC codes follow the trajectories of super-particles (constancy of f constancy of particle strength/charge) A super-particle is a computational particle that represents many real particles. This is OK: the Lorentz force depends only on q/m. The number of super-particles should be chosen so that the phase space is well sampled (good statistics!).
Numerical noise in PIC The particle granularity gives short-scale fluctuations of the electromagnetic fields, whose mean amplitude scales (Poissonlike) as n, where n is the particle density. The fractional contribution of the fluctuations (over the slowly varying fields) scales as 1/ n. This is problematic because the number of super-particles in particle-in-cell codes is number of real particles. We need to control the level of the fluctuations such that they give negligible effects over the timespan of the simulations.
Particles of finite size Since effects from binary interactions are negligible in astrophysical plasmas (ND 1), we want to minimize the effect of short-range Coulomb forces. Yet, computational super-particles (with charge e) over-estimate the strength of the Coulomb force, as compared to real particles. If super-particles are not point particles, but rather have finite size, the strength of binary interactions is reduced.
The particle-in-cell (PIC) loop
Particle-particle vs particle-in-cell PARTICLE-PARTICLE PARTICLE-MESH Calculating inter-particle forces directly is extremely expensive. Warnings: - instantaneous forces (c=infinity) - in a plasma, no binary forces for Debye length Computationally cheaper. The finite light propagation time is self-consistently included. Only macroscopic e.m. fields.
The basic PIC loop
Electrostatic codes
Electrostatic codes Timescales of the system >> light crossing time; magnetic fields static. [credit: A. Spitkovsky]
[credit: A. Spitkovsky]
[credit: A. Spitkovsky]
[credit: A. Spitkovsky]
[credit: A. Spitkovsky]
[credit: A. Spitkovsky]
main lobe:
Electromagnetic codes
The basic PIC loop
1. The field solver In electromagnetic PIC codes, only two equations need to be solved. The other two are satisfied as initial conditions, and they continue to be satisfied for appropriate choices of the numerical scheme.
STAGGERING in time (leapfrog): second-order accurate in time 1. The field solver STAGGERING in space (Yee s mesh): electric fields on cell edges, magnetic fields on cell faces second-order accurate in space maintains divergence-free B
2. The field interpolation The fields obtained from Maxwell s equations are determined only at the grid points, they need to be interpolated to the particle positions. The interpolation is done by assuming a particle shape function. The shape function needs to be: 1. isotropic 2. zero outside some range 3. higher order B-splines are computationally more expensive, but more accurate and less collisional
2. The field interpolation Area-weighting scheme The same shape function should be used for both field interpolation and current deposition, to ensure: global momentum conservation no self-force
3. The particle pusher If the number of ppc is >>1, most of the computing time is spent in pushing the particles. The BORIS pusher (leapfrog method) advance the position advance the momentum (semi-implicit scheme)
3. The particle pusher (A) Advance the momentum: electric acceleration (B) Advance the momentum: magnetic rotation no ambiguity! Can overstep magnetic rotation without stability issues!!! More precisely:
4. The current deposition Charge conservation is required to satisfy Poisson s equation. The current deposition scheme needs to be charge-conserving. Or, a divergence-cleaning solver should be employed.
Assume a plane electromagnetic wave in vacuum: (E,B)=(E 0,B 0 ) exp(ik x-iωt) Dispersion relation on the grid coming from the finite difference scheme of the field solver. Small t is required for stability in explicit schemes. Large t can be achieved in implicit schemes (but still need to resolve the relevant physics!). Stability of PIC codes In addition, to correctly capture the plasma physics, we need: Debye length plasma frequency
Numerical Cerenkov instability For relativistic particles with v>vph, unwanted grid- Cerenkov radiation can occur. The particles lose energy and momentum to grid- Cerenkov radiation. (partial) Solution: 4th-order spatial stencil of field solver. (partial) Solution: filter electric currents.
Boundary conditions and parallelization
Boundary conditions BCs for the fields: periodic conducting (absorbing PML) BCs for the particles: periodic reflecting (absorbing)
Parallelization
Parallelization Distributed memory systems using MPI Field solver and particle pusher are local - Communication only with neighboring nodes Each computing node acts as a section of the global physical space We will show results obtained with the PIC code TRISTAN-MP (Spitkovsky 05) Strong Scaling (fixed total load) Weak Scaling (fixed load per CPU) 1 node 1 node
Summary (PIC codes) The PIC model is a first-principle kinetic model for plasma (astro)physics It efficiently tracks particle trajectories to sample the particle phase space Its structure is scalable to massively parallel computer systems
Hybrid codes
Physical scales Electron time and length scales are << proton time and length scales (credit: D. Burgess)
Hybrid-PIC codes Hybrid approximation: kinetic ions (as in fully-kinetic PIC), fluid electrons with eq. of state ion kinetic physics can be captured, electron kinetic physics cannot the displacement current is neglected (non-relativistic) electrons are massless (non-relativistic) quasi neutrality
Particles in hybrid codes Ions are leap-frogged via the Boris pusher (as in PIC codes) semi-implicit for the velocity Electrons follow the equation of motion of a massless fluid EQUATION FOR THE ELECTRIC FIELD
Electromagnetic fields in hybrid codes No time advance of E is needed Time advance of B Implementation: two-step Lax-Wendroff with a spatially staggered grid (Yee mesh); assume to have B, E at step n, ion positions at n & n+1 and ion velocities at n+1/2 Lax-Wendroff
Complications in the field solver Now we need to determine but we do not know Common approaches: Predictor-corrector: predict fields at n+1, advance particles up to n+3/2, compute fields at n+3/2, average fields at n+1/2 and n+3/2 to obtain fields at n+1. extrapolate E fields extrapolate ion fluid speed CAM-CL (Current Advance Method - Cyclic Leapfrog)
Low-density regions in hybrid codes In regions of low density, the Alfven velocity increases, and the electric field explodes. Possible solutions: in the empty regions, set the density and the electric current to zero, and solve Laplace s equation. increase the number of ppc add a density floor (but unphysical waves will grow!)
Parallelization and scalings Distributed memory systems using MPI Field solver and particle pusher are local Each computing node acts as a section of the global physical space We will show results obtained with the hybrid code dhybrid (Gargate et al. 07) Strong Scaling (fixed total load) Weak Scaling (fixed load per CPU)
Summary (hybrid codes) The hybrid method treats ions kinetically (as PIC) and electrons as a fluid. It is faster than PIC codes, since it neglects the kinetic scales of the electrons. References: * D. Winske & K. B. Quest, 1986 and 1988 * A. P. Matthews, JCP 1994 * A. S. Lipatov, The hybrid multiscale simulation technology, Springer
Astrophysical applications
The collisionless life of galaxy clusters merger shocks in the outskirts of galaxy clusters
The collisionless life of relativistic jets Reconnection and shocks in astrophysical jets
The collisionless life of accretion disks Anisotropy-driven instabilities regulate electron heating and angular momentum transport in collisionless accretion flows, like Sgr A* at our Galactic center.
Blazars Blazars: jets from Active Galactic Nuclei pointing along our line of sight 90º 60º 30º 0º 3C 279 Blazars broadband spectrum, from radio to γ- rays (and even TeV energies) low-energy synchrotron + high-energy inverse Compton (IC) from non-thermal particles high degree of radio and optical polarization magnetic fields (Boettcher 07)
Internal dissipation in blazar jets 3C 120 Internal shocks in blazars and gamma-ray burst jets: trans-relativistic (γ 0 ~a few) magnetized (σ>0.01) δ (mas) = B 2 0 4 0 n 0 m p c 2 toroidal field around the jet field to the shock normal RA (mas) Internal Dissipation: Shocks or Reconnection? B0 θ~90 γ 0
γ dn/dγ Shocks: no turbulence no acceleration σ=0.1 θ=90 γ 0 =15 e - -e + shock Density The Fermi process Maxwellian ε B γβ x Momentum space No returning particles Shock γ No returning particles No self-generated turbulence No self-generated turbulence No particle acceleration (LS+ 13, LS & Spitkovsky 09,11) Strongly magnetized (σ>10-3 ) quasi-perp γ 0 1 shocks are poor particle accelerators: B0 θ σ is large particles slide along field lines θ is large particles cannot outrun the shock unless v>c ( superluminal shock) Fermi acceleration is generally suppressed
Are relativistic shocks always inefficient? = B 2 0 4 0 n 0 m p c 2 Internal shocks in blazars and gamma-ray burst jets: γ 0 ~a few quasi-perpendicular shocks σ~0.01-0.1 internal shocks (Gehrels et al 02) external shocks Gamma-ray burst external shocks: γ 0 ~a few hundreds perpendicular shocks σ~10-9 B0~0
High-σ vs low-σ shocks B0 High-σ shocks: no returning particles no turbulence Density σ=0.1 perp shock γ 0 =15 e - -e + ε B γβ x (LS & Spitkovsky 11) Low-σ shocks: returning particles oblique & filamentation instabilities σ=0 γ 0 =15 e - -e + Density ε B returning stream γβ x incoming stream (LS et al 13)
B0 Low-σ shocks are filamentary Mediated by the filamentation (Weibel) instability, which generates small-scale sub-equipartition magnetic fields. σ=0 γ0=15 e--e+ shock y [c/ωp] εb εb x-xsh [c/ωp] Density z (LS et al. 13)
The Fermi process in low-σ shocks B0 σ=0 γ 0 =15 e - -e + shock ε B γ (LS et al 13) Particle acceleration via the Fermi process in self-generated turbulence, for initially unmagnetized (i.e., σ=0) or weakly magnetized flows.
Relativistic reconnection within jets reconnecting field v X v reconnection electric field reconnecting field Relativistic Reconnection = B 2 0 4 n 0 m p c 2 1 v A c
Hierarchical reconnection σ=10 electron-positron Density box expanding at c y B0 x ε B y x (LS & Spitkovsky 14) Reconnection is a hierarchical process of island formation and merging. The field energy is transferred to the particles at the X-points, in between the magnetic islands.
Hierarchical reconnection σ=10 electron-positron Density ε B ε B -ε E The current sheet breaks into a series of secondary islands (e.g., Loureiro+ 07, Bhattacharjee+ 09, Uzdensky+ 10, Huang & Bhattacharjee 12, Takamoto 13). The field energy is transferred to the particles at the X-points, in between the magnetic islands. Localized regions exist at the X-points where E>B. (LS & Spitkovsky 14)
Inflows and outflows σ=10 electron-positron Density Inflow speed vin/c Outflow speed Inflow into the X-line is non-relativistic, at vin ~ 0.1 c (Lyutikov & Uzdensky 03, Lyubarsky 05) Outflow from the X-points is ultra-relativistic, reaching the Alfven speed r v A = c 1+
The particle energy spectrum σ=10 electron-positron MB p=2 Time At late times, the particle spectrum in the current sheet approaches a power law dn/ dγ γ - p of slope p~2. The normalization increases, as more and more particles enter the current sheet. The mean particle energy in the current sheet reaches ~σ/4 rough energy equipartition (LS & Spitkovsky 14) γmax γ max t Time [ω p -1] The max energy grows as γ max t (compare to γ max t 1/2 in shocks).
tearing drift-kink (LS & Spitkovsky 14) In 3D, the in-plane tearing mode and the out-of-plane drift-kink mode coexist. The drift-kink mode is the fastest to grow, but the physics at late times is governed by the tearing mode, as in 2D.
3D: particle spectrum σ=10 electron-positron 2D out-plane 2D in-plane Time At late times, the particle spectrum approaches a power-law tail of slope p~2, extending in time to higher and higher energies. The same as in 2D. γmax γ max t The maximum energy grows as γ max t (compare to γ max t 1/2 in shocks). The reconnection rate is v in /c~ 0.02 in 3D (compare to v in /c ~ 0.1 in 2D). (LS & Spitkovsky 14) Time [ω p -1]
The highest energy particles γ Density y x (LS & Spitkovsky 14) Two acceleration phases: (1) at the X-point; (2) in between merging islands
Plasmoids in reconnection layers Density B0 2L Magnetic energy Kinetic energy Outflow momentum the plasmoids are over-dense, by a factor of a few. they are in rough equipartition of magnetic and kinetic energy. they are moving outwards at ultra-relativistic speeds.
Plasmoid space-time tracks We can follow the plasmoids in space and time. First they grow, then they go: First, they grow in the center at non-relativistic speeds. Time [L/c] Island Size [L] Then, they accelerate outwards approaching the speed of light. (LS, Petropoulou & Giannios, in prep)
First they grow. Size [L] σ=3 σ=10 σ=50 The plasmoid size grows at a rate of ~0.1 c (dashed lines), with weak dependence on magnetization. Time [L/c] Time [L/c] Time [L/c] (LS, Petropoulou & Giannios, in prep) Outflow Momentum Then they go. σ=3 σ=10 σ=50 Distance/Size Distance/Size Distance/Size (LS, Petropoulou & Giannios, in prep) Size [L] After growing, they accelerate up to the terminal four-velocity ~ σ with a universal acceleration profile.
Dependence on the system size Max Size [L] Let us measure the system size in units of the Larmor radius of post-reconnection particles: r 0,hot = mc2 eb 0 Max Larmor radius [L] Larger systems contain larger plasmoids, and the size of the largest plasmoids is always ~0.1-0.2 L. Larger systems contain higher energy particles, and the Larmor radius of the highest energy particles is always ~ 0.02-0.05 L (Hillas criterion for reconnection). (LS, Petropoulou & Giannios, in prep)
Plasmoids can give bright flares Let us assume a jet with bulk Lorentz factor 10 and half-opening angle 1/10. We vary the plasmoid direction of motion inside the jet (θ =0 along the jet, θ =π/2 perp to the jet). We vary the plasmoid size at the end of the layer (and correspondingly, its final velocity). small and fast large and slow
Plasmoids can give fast flares Let us assume a jet with bulk Lorentz factor 10 and half-opening angle 1/10. We vary the plasmoid direction of motion inside the jet (θ =0 along the jet, θ =π/2 perp to the jet). We vary the plasmoid size at the end of the layer (and correspondingly, its final velocity). small and fast large and slow
Spectra and light curves small and fast large and slow