Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Landau Damping Simulation Models
Hua-sheng XIE (u)§[email protected])
Department of Physics, Institute for Fusion Theory and Simulation, Zhejiang University, Hangzhou 310027, P.R.China
Oct. 9, 2013
Present at: Sichuan University Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Content
Introduction
Linear simulation model
Dispersion relation
Particle-in-cell
Vlasov continuity simulation
Nonlinear Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Introduction
Landau damping1 is one of the most interesting phenomena found in plasma physics. However, the mathematical derivation and physical understanding of it are usually headache, especially for beginners.
Here, I will tell how to use simple and short codes to study this phenomena. A shortest code to produce Landau damping accurately can be even less than 10 lines!
1I think I can safely say that nobody understands Landau damping fully. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Linear simulation model: equation
We focus on the electrostatic 1D (ES1D) Vlasov-Poisson system (ion immobile).
The simplest method to study Landau damping is solving the following equations
∂t δf = −ikvδf + δE∂v f0, (1a) Z ikδE = − δfdv, (1b) Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Example code
1 k=0.4; dt=0.01; nt=8000; dv=0.1; vv=−8:dv : 8 ; 2 df0dv=−vv . ∗ exp(−vv . ˆ 2 . / 2 ) / s q r t (2∗ p i ); 3 df =0.∗ vv +0.1.∗ exp (−(vv −2.0).ˆ2); tt=l i n s p a c e (0 , nt ∗ dt , nt +1) ; 4 dE=z e r o s (1,nt+1); dE(1)=0.01; 5 f o r i t =1: nt 6 df=df+dt .∗( −1 i ∗k . ∗ vv . ∗ df+dE ( i t ) . ∗ df0dv ) ; 7 dE( it+1)=(1i/k) ∗sum ( df ) ∗dv ; 8 end 9 p l o t ( tt , r e a l ( dE ) ) ; x l a b e l ( ’ t ’ ) ; y l a b e l (’Re(dE)’); Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Simulation result
0.4
0.2
0 Re(dE) −0.2
−0.4 0 10 20 30 40 50 60 70 80 t
Figure 1: Linear simulation of Landau damping. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Exercise
Exercise 1: Solving the following fluid equations
∂t δn = −ikδu, (2a)
∂t δu = −δE − 3ikδn, (2b) ikδE = −δn, (2c)
using the above method to reproduce the Langmuir wave
ω2 = 1 + 3k2. (3) Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Dispersion relation
Z 1 ∂f0/∂v D(k, ω) = 1 − 2 dv = 0, (4) k C v − ω/k where C is the Landau integral contour. For Maxwellian 2 1 − v distribution f = √ e 2 , we will meet the well-known plasma 0 2π dispersion function (PDF)
1 Z e−z2 ZM (ζ) = √ dz. (5) π C z − ζ Hence, (4) is rewritten to
1 1 D(k, ω) = 1 − Z 0 (ζ) = 0. (6) k2 2 M Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Numerical solutions
Table 1: Numerical solutions of the Landau damping dispersion relation
kλD ωr /ωpe γr /ωpe 0.1 1.0152 -4.75613E-15 0.2 1.06398 -5.51074E-05 0.3 1.15985 -0.0126204 0.4 1.28506 -0.066128 0.5 1.41566 -0.153359 0.6 1.54571 -0.26411 0.7 1.67387 -0.392401 0.8 1.7999 -0.534552 0.9 1.92387 -0.688109 1.0 2.0459 -0.85133 1.5 2.63233 -1.77571 2 3.18914 -2.8272 Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Comparison of DR and linear simulation Adding some diagnosis lines to the code. Perfect agreement: ωtheory = 1.28506 − 0.066128i and ωsimulation = 1.2849 − 0.06627i
(a) k=0.4, dv=0.019531, dt=0.01 (b) ωS=1.2849, γS=−0.066265 0.6 −10 Re[δ E] 0.4 Im[δ E] −15 0.2 E| E δ δ
0 ln| −20
−0.2 simulation theory −0.4 −25 0 10 20 0 10 20 t t
Figure 2: Linear simulation of Landau damping and compared with theory. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
More
Note: Several related topics have been omitted here, e.g., Case-van Kampen ballistic modes (eigenmode problem), non-physical recurrence effect (the Poincar´erecurrence) at TR = 2π/(k∆v)[1], solving the dispersion relation with general equilibrium distribution functions (not limited to Maxwellian), advanced schemes (e.g., 4th R-K), and so on. One can refer Ref.[2] and references in for more details. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
PIC simulation: equations Normalized equations (Lagrangian approach)
dt xi = vi , (7a)
dt vi = −E(xi ), (7b)
dx E(xj ) = 1 − n(xj ), (7c)
where i = 1, 2, ··· , Np is particle (marker) label and j = 0, 1, ··· , Ng − 1 is grid label. The particles i can be every where, whereas the field is discrete in grids xj = j∆x. ∆x = L/Ng . Domain 0 < x < L [note: R n(x)dx = L], periodic boundary
conditions n(0) = n(L) and E(x) x = 0. Any particle crosses the right boundary of the solution domain must reappear at the left boundary with the same velocity, and vice versa. 2 1 − v The initial probability distribution function [e.g., f = √ e 2 ] is 0 2π generated by Np random numbers. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Key steps
Two key steps for PIC are: 1. Field E(xj ) on grids to E(xi ) on particle position; 2. Particle density n(xi ) to grids n(xj ). Suppose that the i-th electron lies between the j-th and (j + 1)-th grid-points, i.e., xj < xi ≤ xj+1. Usually, the below interpolation method is used
xj+1 − xi 1 nj = nj + , (8a) xj+1 − xj ∆x xi − xj 1 nj+1 = nj+1 + . (8b) xj+1 − xj ∆x The above procedure is repeated from the first particle to the last particle. Similar procedure are used to mapping E(xj ) to E(xi ). Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
PIC result
(a) k=0.7, ω =1.6739−0.3924i S S theory (b) ω =1.7028, γ =−0.43894 6 −1
4 −2 E k −3 Energy 2 E e −4 E tot 0 0 5 10 2 4 6 8 10 t
Figure 3: PIC simulation of Landau damping (pices1d.m code).
The energy conservation is very well. Real frequency and damping rate agree roughly with theory. A main drawback of PIC is the noise. Usually, very large Np is required. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Vlasov continuity simulation: equations
Euler approach. Vlasov equation
∂t f (x, v, t) = −v∂x f − ∂x φ∂v f , (9) Discrete f n+1 − f n f n − f n φn − φn f n − f n i,j i,j = −v i+1,j i−1,j − i+1,j i−1,j i,j+1 i,j−1 , ∆t j 2∆x 2∆x 2∆v (10) gives f n − f n ∆t φn − φn f n − f n ∆t f n+1 = f n −v i+1,j i−1,j − i+1,j i−1,j i,j+1 i,j−1 . i,j i,j j 2 ∆x 2∆x 2 ∆v (11) Poisson equation Z 2 ∂x φ = fdv − 1. (12) Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Discrete
φi+1 − 2φi + φi−1 X = f ∆v − 1 ≡ ρ , (13) ∆x2 i,j i j
i.e., −2 1 0 ·· 0 1 φ1 ρ1 1 −2 1 ··· 0 φ2 ρ2 2 0 1 −2 1 ··· · = · ∆x , (14) ······· · · 1 0 ··· 1 2 φN ρN
where we have used the periodic boundary condition φ(0) = φ(L), i.e., φ1 = φN+1 and φ0 = φN . Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear
Simualtion results
(a) Momentum v.s. Time (b) Density v.s. Time 0.05 1
0 0 n− −0.05 −1 0 10 20 0 10 20 t t (c) k=0.6, ω =1.5457−0.26411i S S theory (d) ω =1.535, γ =−0.26977 10 10 E −2 k 0 E −4 10 e −6 Energy E tot −10 −8 10 0 10 20 5 10 15 20 25 t Figure 4: Vlasov continuity simulation, history plotting (code fkvl1d.m). Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear (a) f(x,v), t=24(25)ω−1, k=0.6 pe 0.4 5 0.3 v 0 0.2 −5 0.1 0 0 2 4 6 8 10 x (b) f(v,t) (c) δf(v,t) 0.1 4 0.05 f f δ 0 2 −0.05 0 −0.1 −5 0 5 −5 0 5 v v Figure 5: Vlasov continuity simulation, distribution function (code fkvl1d.m). Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear Nonlinear simulations The PIC and Vlasov codes provided in the above sections can be easily modified to study the linear and nonlinear physics of the beam-plasma or two-stream instabilities. A PIC simulation of two-stream instability is shown in Fig. 6 and Fig. 7. The linear growth and nonlinear saturation are very clear. Exercise 2: Solving the kinetic or fluid dispersion relations for beam-plasma or two-stream plasma and comparing the results with linear and nonlinear simulations using the above models. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear Simulation result Figure 6: PIC simulation of the two-stream instability, phase space plotting. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear Simulation result 5 −1 4 3 ) −2 1/2 e E ln(E Energy 2 k −3 E 1 e E −4 tot 0 0 20 40 60 20 40 60 t t Figure 7: PIC simulation of the two-stream instability, history plotting. Introduction Linear simulation model Dispersion relation Particle-in-cell Vlasov continuity simulation Nonlinear C. Z. Cheng and G. Knorr, The integration of the vlasov equation in configuration space, Journal of Computational Physics, 22, 330 - 351, 1976. H. S. Xie, Generalized Plasma Dispersion Function: One-Solve-All Treatment, Visualizations, and Application to Landau Damping, Phys. Plasmas, 20, 092125, 2013. Also, http://arxiv.org/abs/1305.6476. With codes.