An introductory Plasma simulation by Particle-in-cell code

 

14 April, 2006  Yoshida Akira

ISIR, Osaka University (akira81@sanken.osaka-u.ac.jp)

 

1. Introduction

Particle-in-cell code simulates the movement of comparatively low density charged particles in an electro-magnetic field. This analyses a behavior of movements for charged particles by solving equations of movement to pursue moving particles and changing electro-magnetic fields.  We intend to study the particle-in-cell code simulation from a primary plasma simulation programs in the 1980’s up to the state of the art technology. The application fields are, for example, Debye shelter to the newest LWFA (Laser Wake Field Acceleration). These are aiming to use for teaching materials for student’s education and also our research to make a shortest and low emittance electron beam by LWFA. Because scientists are using ever-shorter time scales to investigate physical and chemical reactions [1]. But, it will be a long and winding road, if I do this myself all alone.

This paper is a result for the first attempt to make a C++ code based on the one-dimensional Berkeley code [2] and S.Kawata’s Fortran PIC code [3]. At last, a future plan is discussed.  

 

2. One dimensional (1D) Electro-static particle-in-cell code for a static electro-magnetic field

2-1. Method

At first, we made a 1D Electro-static particle-in-cell code program to start from a simulation in the simplest environment: a static electro-magnetic field in one dimension space. The computing algorithm is as follows;

a). Solve the poison equation :  

   (φ is elctro-static potential, ρis charge density per an unit volume, εis dielectric constant),

for a given space charge placement, and get the potential and electric field in the space mesh.   

b). Compute the electric field Ep in the mesh i and i+1 using static electric fields Ei+1/2        and Ei+3/2 , and approximating Ep is in inverse proportional to the distance to (i+1/2) and (i+3/2) as:

 

Ep=(S1Ei+1/2 + S2Ei+3/2)/( S1 + S2);    S1 : the distance between particle and (i+3/2),

                           S2 : the distance between (i+1/2) and particle.

 

                 ßS2àß---- S1 ----à                  @:the position of particle

|----- - - - ----|------------|------@----|-----------|----------------------- - - - -----------------|

i=1         i      i+1/2       i+1    i+3/2 …..                 Total mesh number   

                          Ep

         

c). Assign all charges of the particles in a space mesh assuming the electric charge per a particle is q, and decide the charge Q in the total mesh using the distance same as above :

Qi = qS1/( S1 + S2) ,  Qi+1 = qS2/( S1 + S2).

The charge density can be calculated with the value divided the sum charge Q by the mesh capacity.

d). Repeat a). to c). to simulate the change of the electric field and the positions of charged particles. 

2-2. Results

Here, we show the first result for a simple simulation for the movement of charged particles in a static electro-magnetic field in one dimension space. The number of charged particles is 160, the total mesh number is 16, and so the number of particles generated in a mesh is 10. Although it is a tiny toy simulation we can see an interesting results, for example, this can be regarded as a sort of simulation for Debye shelter.

The initial conditions are:

a) At first (t=0), electrons are spreading uniformly in the space and the velocities are almost zero.

b) From next time steps (t>=1) a static electric potential is added to this 1D space.

  Then we can see the spreading electrons at t=0 gathered the position 0 ~ 20 after time step t>=1, and the velocities are extending 0 ~ -30 very slowly (Fig.1). Charged particles accelerated by the static electric potential move at uniform acceleration. These moving particles make a current in this space and this current make a magnetic field around it. Next, the particles start a gyrating movement and accelerated towards the opposite pole of the charge (fig.2). As the density of electric charge and the distribution in the space change, we continue calculating the electric field, magnetic field, and the movement of particles by solving the poison equation in order to follow the movement of particles in the given electro magnetic field.     

 

 

3. Two dimensional (2D) Electro-static particle-in-cell code for a electro-magnetic field

3-1. Method

Two dimensional poison equation can be resolved with a central finite difference method same as above. Two dimensional poison equation with a boundary condition :

can be approximated as follows:

  

Here, Ei,j means the electric field at x=i, and y=j in the mesh. h is a mesh interval.

 

 

 

4. Summary and future challenges

 

The first future plan is to expand this code to multi dimensional version with a polar coordinate or a circular cylindrical coordinates in order to simulate many kinds of dynamic electro-magnetic field including, for example, magnetohydrodynamic (MHD), laser light interaction with plasma, cold plasma oscillations, magnetized warm plasma, beam plasma instability, laser wakefield acceleration (LWFA), interplanetary and astrophysical plasmas, et.al, to analyze every plasma phenomena. 

 

The second plan is a mathematical review for a stability factor analysis for the discretized solution used in this particle-in-cell program. And, at the same time, I would like to investigate the problem of chaotic dynamical systems [4] inevitably produced by the central difference scheme used in the algorithms in Particle-in-cell code to improve the precision of simulations.  

 

References

[1] F.Krausz, Max-Plank; Nature, Feb 26, 2004

[2] J P Verboncoeur, et.al, An object-oriented electromagnetic PIC code, Comput. Phys. Commun. 87 199-211 (1995)

[3] S.Kawata, A.Manabe, S.Takeuchi,”High-energy electron production by an electromagnetic wave with a static magnetic field” Japanese Journal of Applied Physics, Vol. 28, No.4 (1989)

[4] Peitgen, Jurgens, Saupe “Chaos and Fractals—New frontiers of Science” Springer-Verlag (1992)

[5] J P Verboncoeur, “Particle simulation of plasmas: review and advances”, Plasma Phys. Control. Fusion 47 (2005)

[6] C.K. Birdsall, “Plasma physics via computer simulation” Institute of physics Pub. (1991)

 

 

Fig.1: A simulation of Debye shelter by 1D Electro-static particle-in-cell code : 

Particles around the position 0~140 uniformly at time=0 move to the position 0~20 at time=10~110, and the velocity about 0 at time=0 spread abruptly to -35~0 during time=10~110 in this simulation.

 

Fig.2:  Moving particles make a current in this space and this current make a magnetic field around it. This makes the particles start a rotating movement and accelerate towards the opposite pole of the charge. Here only half circular trajectories can be seen because the coordinate for particle position shows no negative values