JIFT workshop! Oct. 31, 2014 New Orleans, LA.! Guangye Chen, Luis Chacón, CoCoMANs team Los Alamos National Laboratory, Los Alamos, NM 87545, USA gchen@lanl.gov 1
Los Alamos National Laboratory Motivation and background of PIC Vlasov-Darwin model and its discretization Theorems of charge conservation, canonical momentum conservation, and energy conservation (in the discrete) 1D3V, 2D3V test examples Fluid preconditioning and performance gains Summary gchen@lanl.gov 2
Particle-in-cell method provides the most affordable and accurate tool for plasma kinetic simulations. Challenge: integrate electron-ion-field kinetic system on ion timescale and system length scale while retaining electron kinetic effects accurately. gchen@lanl.gov 3
u PIC method solves Vlasov Maxwell equa1ons using a (hybrid) par1cle- mesh formula1on. Δx f t + v f + F m f = 0 v Newton equa1ons of mo1on x = v v = F /m F = q(e + v B) Interpola1ons are required between par1cles and fields. Maxwell equa1ons E = ρ /ε 0 B = 0 t B = E t E c 2 = B µ 0 j gchen@lanl.gov 4
Leap-frog time integration, simple and robust. [Birdsall and Langdon, Plasma physics via computer simulation] min(cδt<δx, ω pe Δt<1) enforces a minimum temporal resolu1on Δx < λ Debye enforces a minimum spa1al resolu1on Lack of discrete energy conserva1on, problema1c for long- 1me simula1ons Memory- bound: challenging for efficiency on modern computers gchen@lanl.gov 5
u Implicit method holds the promise to overcome the difficul1es and inefficiencies of explicit methods u Implicit PIC has been explored since 1980s. All earlier approaches use semi- implicit, linearized methods: Ø lack of nonlinear convergence Ø inconsistent between par1cles and moments Ø inaccurate! Plasma self- hea1ng/cooling [Cohen,Langdon, and Hewett,1989] u Our approach: nonlinear implicit PIC Ø nonlinear convergence between par1cle, moments, and fields Ø stable 2 nd order accurate integra1on with large Δt and Δx Ø exact discrete conserva1on of global energy, local charge, canonical momentum Ø adap1ve in 1me and space via mapped meshes without loss of the conserva1on proper1es Ø fluid precondi1oning to accelerate the kine1c solver! gchen@lanl.gov 6
Los Alamos National Laboratory and u Elimination of light waves : no need to deal with the noise and stability issues with the light waves. retains low-freq. electrostatic, magnetostatic, and inductive fields. approximates Maxwell s equations to order (v / c). 2 coulomb gauge is required. charge conservation, is implied (div. of A equation). hyperbolic to elliptic equations à explicit time integration does not work! gchen@lanl.gov 7
Standard 2 nd order FDTD approach on a mapped mesh (x,y) = f(ξ,η). with η, y Hybrid particle pusher in logical space: ξ, x Interpolation is crucial for numerical realization of conservation laws. gchen@lanl.gov 8
Numerically, div(a) must vanish to satisfy the Coulomb gauge, and for energy conservation. Self-adjoint discretization of the fluxes of Laplacian is used for div(a)=0: gchen@lanl.gov 9
Field integration Particles are sub-stepped, and current is orbit-averaged gchen@lanl.gov 10
The continuity equation is satisfied on the grid per particle per sub-timestep, such that in 2D, where we define:. gchen@lanl.gov 11
The canonical momentum conservation in an ignorable direction (say, z or ζ) where is satisfied per particle per sub-timestep (m=2). The theorem can be proved by rearranging the conservation equation to where const. in! which is exactly our implicit Boris push. gchen@lanl.gov 12
Los Alamos National Laboratory The total energy of the (periodic, Cartesian geometry with) system is conserved for each timestep, such that The proof of theorem starts by dotting the v equation of motion by mv and summing all particles Same Shape for j and E interpolations. Change of electrostatic energy Change of magnetic energy { div(a)=0 gchen@lanl.gov 13
Los Alamos National Laboratory time level n NONLINEAR ITERATION Maxwell eqs n+1 n+1 E, B Particle mover r n+1 p, v n+1 p JFNK Fluid moments ρ n+1 n+1 n+1, u α, Eα,... Closure relations M m n+1 α ( ) time level n+1 14 gchen@lanl.gov 14
1D-3V Los Alamos National Laboratory Initial single mode perturbation L=32d e ; Nx =64; mi/me=1836 Npc=8000; T ey,z /T e,x =2.56; ω pe Δt = 1. gchen@lanl.gov 15
Δτ<<Δt Orbit-average Δτ Δt gchen@lanl.gov 16
1D3V Weible case Performance of explicit PIC is stringently limited by the CFL condition, cδt<δx λ D. Large Scale gchen@lanl.gov 17
1D-3V initial one mode perturbation L=30d i ; Nx =64; mi/me=1836 Npc=2000; T iy,z /T i,x =40,000; ω pi Δt = 0.2 gchen@lanl.gov 18
M i /m e =1836 L=4pi/3 (d i ) (Δx 40λ D ) Nx =64 Npc=2000 ω pi Δt = 0.1 ( 60CFL ex ) Three species: e,i a,i b β e =0.1, β ia =0.1, β ib =0.01 V A =1/3 M i /m e 7.8e-3 G. Chen (gchen@lanl.gov) APS DPP 2013 19 gchen@lanl.gov 19
2D-3V Los Alamos National Laboratory initial all supported modes perturbation packed grid spacing L=22x22 (d e xd e ); Ng =128x128 (uniform grid); 64x128 (packed grid); mi/me=1836; Np/cell=800; T ey,z /T e,x =9; ω pe Δt = 1. gchen@lanl.gov 20
Conservation Properties Los Alamos National Laboratory gchen@lanl.gov 21
M i /m e =25 L=10x10 (d i ) Nx =64x64 Npc=500 ω pi Δt = 0.1 Three species: e,i a,i b β e =0.1, β ia =0.1, β ib =0.01 V A =1/3 M i /m e 7.8e-3 G. Chen (gchen@lanl.gov) APS DPP 2013 22 gchen@lanl.gov 22
Los Alamos National Laboratory Basic idea: to advance field, ρ and j can be obtained from moment equations. Consider electron moment equations only. After linearization: The moment equations are coupled with linearized field equations: For electrostatic responses: For electromagnetic responses: gchen@lanl.gov 23
Weibel case No preconditioner w/ preconditioner Speedup ω pi *dt Netwon GMRES Netwon GMRES 0.01 3.9 105.3 2.7 0 30 0.025 5.7 188.5 3.1 0 47 0.1 7.7 237.8 3.9 3.6 29 mi/me 25 5.8 192.5 3.1 0 48 100 5.7 188.8 3.1 0 47 1836 - - - - grid 32x32 4 38.5 3.0 2.0 7 64x64 4.3 79.9 3.0 1.0 17 128x128 - - - - v average over 10 timesteps. gchen@lanl.gov 24
Los Alamos National Laboratory We have formulated and verified a 2D3V, exact energy, charge, and canonical momentum conserving electromagne1c PIC algorithm using the Vlasov- Darwin model. Numerical experiments show the 2 nd order accuracy of the implicit 1me integra1on with both small and large 1mesteps. For intermediate 1mesteps, the errors are controlled by orbit- averaging. We have formulated a fluid precondi1oner for the JFNK- based kine1c solver. Significant gains (10x- 50x) have ben obtained. CPU comparisons between explicit and implicit PIC demonstrate that implicit scheme can outperform the explicit ones for large- scale and/or low- frequency problems. gchen@lanl.gov 25