Computational Methods in Plasma Physics

Similar documents
Landau Damping Simulation Models

Summer College on Plasma Physics. 30 July - 24 August, The particle-in-cell simulation method: Concept and limitations

Lecture 4: The particle equations (1)

Chapter 1. Introduction to Nonlinear Space Plasma Physics

EXASCALE COMPUTING. Implementation of a 2D Electrostatic Particle in Cell algorithm in UniÞed Parallel C with dynamic load-balancing

A particle-in-cell method with adaptive phase-space remapping for kinetic plasmas

Semi-Lagrangian Formulations for Linear Advection Equations and Applications to Kinetic Equations

Verification and Convergence Properties of a Particle-In-Cell Code

Plasma waves in the fluid picture I

Lecture Note 1. 99% of the matter in the universe is in the plasma state. Solid -> liquid -> Gas -> Plasma (The fourth state of matter)

Gyrokinetic simulations of magnetic fusion plasmas

Particle-In-Cell Code for Two-Stream Instability

Collisionless magnetic reconnection with arbitrary guide-field

Introduction. Chapter Plasma: definitions

Tight-Focusing of Short Intense Laser Pulses in Particle-in-Cell Simulations of Laser-Plasma Interaction

Sheath stability conditions for PIC simulation

Chapter 6 - Ordinary Differential Equations

Physics 584 Computational Methods

Benchmarks in Computational Plasma Physics

A Brief Introduction to Numerical Methods for Differential Equations

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Simulation Techniques for HED I: Particle-in-Cell Methods

High Order Semi-Lagrangian WENO scheme for Vlasov Equations

Modeling and Experimentation: Compound Pendulum

Particle-in-cell (PIC) simulation output for the temporal evolution of magnetic fields.

Accurate representation of velocity space using truncated Hermite expansions.

The Fourier spectral method (Amath Bretherton)

Heating and current drive: Radio Frequency

Anisotropic electron distribution functions and the transition between the Weibel and the whistler instabilities

Figure 1.1: Ionization and Recombination

ODE Runge-Kutta methods

Ordinary Differential Equations (ODEs)

Study of Laser Plasma Interactions Using an Eulerian Vlasov Code

Chap. 20: Initial-Value Problems

The ideal Maxwellian plasma

Lecture 4: Numerical solution of ordinary differential equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Ordinary differential equations - Initial value problems

Hybrid semi-lagrangian finite element-finite difference methods for the Vlasov equation

Darwin-Vlasov Simulations of magnetized Plasmas

Worksheet 8 Sample Solutions

Ordinary Differential Equations

Asymptotic-Preserving Particle-In-Cell method for the Vlasov-Poisson system near quasineutrality

VLASOV1: One-dimensional electrostatic Vlasov code Hands-on session in 13th International School for Space Simulations (ISSS-13)

Electromagneic Waves in a non- Maxwellian Dusty Plasma

Maths III - Numerical Methods

PHYSICS OF HOT DENSE PLASMAS

Plasma Astrophysics Chapter 1: Basic Concepts of Plasma. Yosuke Mizuno Institute of Astronomy National Tsing-Hua University

Electrodynamics PHY712. Lecture 3 Electrostatic potentials and fields. Reference: Chap. 1 in J. D. Jackson s textbook.

Finite Volume Method for Scalar Advection in 2D

Fourth Order RK-Method

Outline. 1 Why PIC Simulations Make Sense. 2 The Algorithm. 3 Examples Surface High Harmonics Generation. 4 Extensions Of The PIC Algorithm

Partial differential equations

Dispersive Media, Lecture 7 - Thomas Johnson 1. Waves in plasmas. T. Johnson

KINETIC SIMULATION OF LASER-PLASMA INTERACTIONS

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

Lectures on basic plasma physics: Introduction

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

13.1 Ion Acoustic Soliton and Shock Wave

Simulation of Relativistic Jet-Plasma Interactions

Non-Equidistant Particle-In-Cell for Ion Thruster Plumes

Energy-Conserving Numerical Simulations of Electron Holes in Two-Species Plasmas

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Sound. References: L.D. Landau & E.M. Lifshitz: Fluid Mechanics, Chapter VIII F. Shu: The Physics of Astrophysics, Vol. 2, Gas Dynamics, Chapter 8

NOTE. Application of Contour Dynamics to Systems with Cylindrical Boundaries

1 Introduction to MATLAB

Structure formation. Yvonne Y. Y. Wong Max-Planck-Institut für Physik, München

A Comparison between the Two-fluid Plasma Model and Hall-MHD for Captured Physics and Computational Effort 1

Incompressible MHD simulations

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0

Direct Sum. McKelvey, and Madie Wilkin Adviser: Dr. Andrew Christlieb Co-advisers: Eric Wolf and Justin Droba. July 23, Michigan St.

Kinetics of the Raman Instability in a Laser Plasma

Tight-Focusing of Short Intense Laser Beams in Particle-in-Cell Simulations of Laser-Plasma Interaction

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Differential Equations

Space Plasma Physics Thomas Wiegelmann, 2012

MA3232 Summary 5. d y1 dy1. MATLAB has a number of built-in functions for solving stiff systems of ODEs. There are ode15s, ode23s, ode23t, ode23tb.

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Recovering point sources in unknown environment with differential data

A note on the plasma sheath and the Bohm Criterion

Electromagnetic Waves

Scientific Computing: An Introductory Survey

A recovery-assisted DG code for the compressible Navier-Stokes equations

Numerical Methods for Ordinary Differential Equations

Multistep Methods for IVPs. t 0 < t < T

Ph 22.1 Return of the ODEs: higher-order methods

2/8/16 Dispersive Media, Lecture 5 - Thomas Johnson 1. Waves in plasmas. T. Johnson

PHYS 408, Optics. Problem Set 1 - Spring Posted: Fri, January 8, 2015 Due: Thu, January 21, 2015.

Solution of time-dependent Boltzmann equation for electrons in non-thermal plasma

Weibel instability and filamentary structures of a relativistic electron beam in plasma

EXAMINATION QUESTION PAPER

Finite difference models: one dimension

LANDAU DAMPING A. GRIFFIN, J.J. KOSKELA, F.Q. NAZAR, T. RANNER

Finite Volume Schemes: an introduction

Selected electrostatic problems (Lecture 14)

Moments conservation in adaptive Vlasov solver

Introduction to FARGO3D

Numerical method for approximating the solution of an IVP. Euler Algorithm (the simplest approximation method)

Vector Fields and Solutions to Ordinary Differential Equations using Octave

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Transcription:

Computational Methods in Plasma Physics Richard Fitzpatrick Institute for Fusion Studies University of Texas at Austin

Purpose of Talk Describe use of numerical methods to solve simple problem in plasma physics that, nevertheless, cannot be solved via standard analytic methods. 1

Plasma Physics Problem Collisionless, unmagnetized, 1D (i.e., / y = 0, / z = 0) plasma consisting of N electrons and N singly-charged ions. Ions much more massive than electrons, so on sufficiently short time-scales can treat ions as static, uniform, neutralizing background, and only consider motion of electrons. Initial state: Two counter-propagating warm electron beams. If beam speed significantly larger than thermal speed then system unstable to two-stream instability (see Wikipedia page). At small perturbation amplitudes, two-stream instability can be treated analytically. At large perturbation amplitudes, analytic methods break down, necessitating numerical approach. 2

Electron Equations of Motion Let r i be x-coordinate of ith electron. Equations of motion of ith electron are dr i dt = v i, dv i dt = e E(r i ), m e where e>0is magnitude of electron charge, m e is electron mass, and E(x) is x-component of electric field-strength at position x. N.B. 1D nature of problem implies that mode is longitudinal: i.e., k E. Longitudinal plasma modes do not self-generate magnetic fields. Hence, absence of magnetic term in equations of motion. 3

Poisson s Equation Electric field-strength expressed in terms of scalar potential, Poisson-Maxwell equation yields E(x) = dφ dx. d 2 φ dx 2 = e ɛ 0 [n 0 n(x)], where ɛ 0 is permittivity of free-space, n(x) is electron number density [i.e., number of electrons in interval x to x + dx is n(x) dx], and n 0 is uniform ion number density. Spatial average of n(x) equal to n 0, since equal numbers of ions and electrons. 4

Initial State Initial electron distribution function consists of two counterpropagating Maxwellian beams of mean speed v b and thermal spread v t : i.e., f(x, v) = n 0 2 [ 1 2π vt e (v v b) 2 /(2v 2 t ) + ] 1 e (v+v b) 2 /(2vt 2 ). 2π vt f(x, v) dx dv is probable number of electrons between x and x + dx with velocities in range v to v + dv. Beam temperature, T, related to thermal spread via v t = T/m e, where T measured in energy units. 5

Normalization First step in solving physics problem numerically is to normalize governing equations: i.e., render all variables dimensionless, and as many as possible O(1). Normalization reduces likelihood of arithmetic underflow and overflow. Normalization facilities identification of terms in governing equations that can be safely neglected (such terms having magnitudes much less than unity). 6

Normalization Scheme All times expressed in units of ωp 1,where n 0 e ω p = 2 ɛ 0 m e is electron plasma frequency: i.e., typical frequency of electrostatic electron oscillations. All lengths expressed in units of Debye length, λ D = v t ω p : i.e., typical length-scale above which electrons exhibit collective (i.e., plasma-like) effects, instead of acting like individual particles. 7

Normalized Equations Normalized electron equations of motion: dr i dt = v i, dv i dt = E(r i), E(x) = dφ dx, d 2 φ dx 2 = n(x) 1. n 0 Normalized initial distribution function: f(x, v) = n 0 2 [ 1 e (v v b) 2 /2 + 1 ] e (v+v b) 2 /2 2π 2π. 8

Spatial Domain of Solution Equations solved in spatial domain 0 x L, where L 1: i.e., plasma many Debye lengths in extent. For sake of simplicity, adopt periodic boundary conditions: i.e., identify left and right boundaries of solution domain. Follows that n(0) =n(l), E(0) =E(L), φ(0) =φ(l) at all times. Electrons that cross right boundary of solution domain must reappear at left boundary with same velocity, and vice versa. 9

Spatial Discretization Define set of J equally-spaced spatial grid points located at coordinates x j = jδx, for j = 0 to J 1, whereδx = L/J. Let et cetera. n j = n(x j ), φ j = φ(x j ), 10

Evaluation of Electron Number Density - I Electron number density at grid points calculated from electron coordinates via particle-in-cell (PIC) approach. Suppose ith electron lies between jth and (j + 1)th grid points: i.e., x j <r i <x j+1.let ( )/ xj+1 r i n j n j + δx, x j+1 x j ( )/ ri x j n j+1 n j+1 + δx. x j+1 x j Thus, n j δx increases by 1 if electron at jth grid point, n j+1 δx increases by 1 if electron at (j + 1)th grid point, n j δx and n j+1 δx both increase by 1/2 if electron halfway between grid points, et cetera. 11

Evaluation of Electron Number Density - II Performing analogous assignment for each electron, in turn, allows the n j to be determined from the r i (assuming that all the n j initialized to zero at start of process). Clear that L 0 n(x) dx j=0,j 1 n j δx = N, as must be the case if the system contains N electrons. Relative error in calculation of the n j from the r i is O(1/J 2 ). 12

Fourier Solution of Poisson s Equation - I Poisson s equation (n.b., n 0 = N/L in normalized units): d 2 φ dx 2 = ρ(x), ρ(x) =n(x)/n 0 1. Let φ j = φ j e i jj 2π/J, ρ j = j =0,J 1 ρ j e i jj 2π/J, j =0,J 1 for j = 0 to J 1, which automatically satisfies periodic boundary conditions φ J = φ 0 and ρ J = ρ 0. 13

Fourier Solution of Poisson s Equation - II ρ 0 = L 0 ρ(x) dx/l = 0, because L 0 n(x) dx/l = n 0. Remaining ρ j obtained via standard Fourier inversion theorem: ρ j = J 1 ρ j e i jj 2π/J. j =0,J 1 Fourier inversion of Poisson s equation yields: φ0 = 0, and for j = 1 to J/2. Also, φ j = ρ j / [ j 2 (2π/L) 2] φ j = φ J j for j = J/2 + 1 to J 1, which ensures that φ j are real. 14

Electric field at grid points: Calculation of E j for j = 0 to J 1. E j = φ j 1 φ j+1 2δx, N.B. j = 0 and j = J 1 are special cases that are resolved using periodic boundary conditions. Relative error in above first-order discretization scheme is O(1/J 2 ). 15

Calculation of E(r i ) Suppose that r i lies between jth and (j + 1)th grid points: i.e., x j <r i <x j+1. Linear interpolation: ( ) xj+1 r i E(r i )= E j + x j+1 x j ( ) ri x j E j+1. x j+1 x j Relative error in interpolation scheme is O(1/J 2 ). 16

Fast Fourier Transform Discrete Fourier transform (DFT) is computationally expensive because of large number of trigonometric function evaluations. DFT typically require O(J 2 ) arithmetic operations. Fast Fourier transform (FFT) algorithm (see Wikipedia page) rapidly computes DFT via factorization. FFT only requires O(J ln J) arithmetic operations. Since J = 1000 in program, use of FFT algorithm implies reduction in arithmetic operations per time-step by factor of 100. Program implements FFT algorithm via calls to fftw library. a a http://www.fftw.org 17

Euler Method Suppose that function y(t) satisfies first-order ordinary differential equation (ODE) dy dt = f[y(t)]. Equation can be solved numerically via repeated use of Euler method (see Wikipedia page): y(t + h) =y(t)+hf[y(t)] + O(h 2 ). Truncation error per time-step is O(h 2 ), necessitating relatively small time-steps to keep overall truncation error to acceptable levels. Generalization to system of N coupled first-order ODEs straightforward. 18

Fourth-Order Runge-Kutta Method Fourth-order Runge-Kutta (RK4) method (see Wikipedia page): k 1 = hf[y(t)], k 2 = hf[y(t)+k 1 /2], k 3 = hf[y(t)+k 2 /2], k 4 = hf[y(t)+k 3 ], y(t + h) =y(t)+k 1 /6 + k 2 /3 + k 3 /3 + k 4 /6 + O(h 5 ). Algorithm requires approximately 3 times number of arithmetic operations per time-step as Euler method. However, truncation error per time-step much smaller [O(h 5 ) rather than O(h 2 )]. Can take much larger time-steps using RK4 method. More than makes up for factor of 3 increase in operations per time-step. 19

Program Pic Program Pic a is PIC code (which implements previously described calculation) written in C++ language. Program uses RK4 algorithm to integrate electron equations of motion. At each time-step, Poisson s equation solved via calls to fftw library. Default program parameters: N = 20, 000, L = 100, v b = 3, J = 1000, h = 0.1. a http://farside.ph.utexas.edu/teaching/plasma/plasma.html 20

Initial State: t = 0 21

Final State: t = 50 22

Visualization Phase-space motion of electrons visualized as follows: Program writes electron phase-space coordinates to file at each time-step (with separate file for each time-step). Python a script reads coordinate files and employs Matplotlib b package to produce separate png plot of electron phase-space positions at each time-step. Finally, Python script calls ImageMagick c image processing application to combine separate png plots into animated gif. (Animated gifs can be viewed by all modern web-browsers.) a http://www.python.org b http://matplotlib.org c http://www.imagemagick.org 23

Energy Conservation Only force in problem (self-generated electric field) is conservative. So, total system energy should be constant of motion. (Normalized) total system energy: where E = K + U, K = i=1,n v 2 i /2 is kinetic energy of electrons, and energy stored in electric field is U = n 0 2 L 0 E 2 (x) dx = 1 2 L 0 n(x) φ(x) dx = i=1,n φ(r i )/2. 24

Test of Energy Conservation Blue curve is E/N. Red curve is K/N. 25

Entropy Conservation Motion of electrons in self-generated electric field should be reversible in time: i.e., if we take final state, reverse velocities of all electrons, and evolve system forward in time by same amount, then should recover initial state (with reversed velocities). Equivalent to saying total entropy of system is constant of motion. 26

Initial State: t = 0 27

Final State: t = 50 28

Using PIC Code to Simulate Real Plasma Real plasmas typically consist of N A 10 24 electrons. This is far greater number than could ever be accommodated in PIC code. Particle motion in PIC code only depends on charge-to-mass ratio. Could identify particles in PIC code as super-particles consisting of correlated clumps of real particles. Alternatively, could identify particles in PIC code as markers used to reconstruct electron distribution function, f(x, v, t), ateach time-step, in much same manner as electron number density, n(x), reconstructed from electron coordinates in code. Hence, PIC code effectively evolving Vlasov equation: f t + v f x ee(x) m e f v = 0. 29

Statistical Noise in PIC Codes PIC codes suffer from statistical noise. If phase-space binned into regions of volume dx dv then distribution function in given bin has irreducible statistical variation of relative magnitude 1/ N bin, where N bin is typical number of electrons in each bin. In 1D (1 space dimension, 1 velocity dimension), with 100 100 bins in phase-space, keeping statistical noise below 1% requires 100 100 100 2 = 10 8 electrons. In 2D, (2 space dimensions, 2 velocity dimensions), with 100 2 100 2 bins in phase-space, keeping statistical noise below 1% requires 100 2 100 2 100 2 = 10 12 electrons. In 3D, (3 space dimensions, 3 velocity dimensions), with 100 3 100 3 bins in phase-space, keeping statistical noise below 1% requires 100 3 100 3 100 2 = 10 16 electrons! 30

Continuum Codes Alternative to PIC approach is to solve Vlasov equation, f t + v f x ee(x) m e f v = 0, directly, using analogous methods to those typically used to solve fluid codes. Main advantage of so-called continuum codes is absence of statistical noise. Disadvantage is that numerical algorithms used in continuum codes more complicated that those used in PIC codes. Also, continuum codes harder to parallelize that PIC codes. 31

Scientific Computation Resources Scientific computation course: http://farside.ph.utexas.edu. Gnu Scientific Library (GSL). a Free (!) C library of numerical routines for scientific computation. Includes special functions, linear algebra, eigensystems, adapative integration of odes, etc. Matplotlib. b Free python 2D plotting library. Maxima. c Free computer algebra system. Petsc. d Free suite of data structures and routines for scalable (parallel) solution of partial differential equations. a http://www.gnu.org/software/gsl b http://matplotlib.org c http://maxima.sourceforge.net d http://www.mcs.anl.gov/petsc 32