Cloud in Cell

https://www.gnu.org/software/archimedes/manual/html/node29.html

Since the number of particles in a simulation is quite limited, if compared to the number of particles in a real semiconductor device, noise will always be present in the solutions generated by GNU Archimedes. That is why we have to use an advanced algorithm in order to avoid, as the best as possible, this noise, instead of simply counting the number of particles in the cells of the simulation. For this purpose, we use in GNU Archimedes the well-known cloud-in-cell algorithm. For more information about cloud-in-cell method and more advanced algorithms see the following papers.

S.E.Laux, "On Particle-Mesh Coupling in Monte Carlo Semiconductor Device Simulation", IBM Research Report, RC 20101

We report here a brief description of the cloud-in-cell method.

Let us consider a finite difference mesh with the nodes located at \((x_i, y_j)\). Let us denote by \(\Delta x\) and \(\Delta y\) the constant spatial step in the \(x\)-direction and \(y\)-direction. Then, if we denote by \((x, y)\) the point coordinates in which one wants to compute the density charge, wieh \(x_i < x < x_{i+1}\) and \(y_i < y < y_{i+1}\), we compute the density in the following way \[ n_{i,j} = \frac{S_{i, j}}{A^2_{i,j}} (x_{i+1} - x) (y_{j+1}-y) \] \(n_{i,j}\)\((x_i, y_j)\)处的密度,\(S_{i, j}\)是粒子位于\((x_i, y_j)\)的统计权重,\(A_{i,j}=\Delta x_i \Delta y_j\)

## Particle in Cell

In plasma physics, the particle-in-cell method refers to a technique used to solve a certain class of partial differential equations. In this method, individual particles (or fluid elements) in a Lagrangian frame are tracked in continuous phase space, whereas moments of the distribution such as densities and currents are computed simultaneously on Eulerian mesh points. PIC methods were already in use as early as 1955, even before the first Fortran compilers were available. In plasma physics applications, the method amounts to following the trajectories of charged particles in self-consistent electromagnetic or electrostatic fields on a fixed mesh.

Technical aspects

plasma simulation, for which the method typically includes the following procedures:

  • integration of the equations of motion
  • interpolation of charge and current source terms to the field mesh
  • computation of the fields on mesh points
  • interpolation of the fields from the mesh to the particle locations

Models which include interactions of particles only through the average fields are called PM (particle-mesh). Those which include direct binary interactions are PP (particle-particle). Models with both types of interactions are called PPPM or P3M.

Since the early days, it has been recognized that the PIC method is susceptible to error from so-called discrete particle noise. This error is statistical in nature, and today it remains less-well understood than for traditional fixed-grid methods, such as Eulerian or semi-Lagrangian schemes.

学习新东西的时候,一个很好的方式就是试图把它和自己已经有所认识的东西相结合,一方面可以帮助自己的理解,另一方面也可能从一些新的角度来产生一些交叉的新的观点。

Modern geometric PIC algorithms are based on a very different theoretical framework. These algorithms use tools of discrete manifold, interpolating differential forms, and canonical or non-canonical symplectic integrators to guarantee gauge invariant and conservation of charge, energy-momentum, and more importantly the infinitely dimensional symplectic structure of the particle-field system. [4] [5] These desired features are attributed to the fact that geometric PIC algorithms are built on the more fundamental field-theoretical framework and are directly linked to the perfect form, i.e., the variational principle of physics.

Inside the plasma research community, systems of different species (electrons, ions, neutrals, molecules, dust particles, etc.) are investigated. The set of equations associated with PIC codes are therefore the Lorentz force as the equation of motion, solved in the so-called pusher or particle mover of the code, and Maxwell's equations determining the electric and magnetic fields, calculated in the field solver.

Super-particles

The real systems studied are often extremely large in terms of the number of particles they contain. In order to make simulations efficient or at all possible, so-called super-particles are used. A super-particle is a computational particle that represents many real particles; it may be millions of electrons or ions in the case of a plasma simulation, or, for instance, a vortex element in a fluid simulation. It is allowed to rescale the number of particles, because the acceleration from the Lorentz force depends only on the charge-to-mass ratio, so a super-particle will follow the same trajectory as a real particle would.

其实就是声子蒙特卡洛模拟里,一个模拟的声子团代表着许多的声子。

The particle mover

Even with super-particles, the number of simulated particles is usually very large, and often the particle mover is the most consuming part of PIC, since it has to be done for each particle separately. Thus, the pusher is required to be high accuracy and speed and much effort is spent on optimizing the different schemes.

The schemes used for the particle mover can be split into two categories, implicit and explicit solvers. While implicit solvers calculate the particle velocity from the already updated fields, explicit solvers use only the old force from the previous time step, and are therefore simpler and faster, but require a smaller time step. In PIC simulation the leapfrog method is used, a second-order explicit method. Also the Boris algorithm is used which cancel out the magnetic field in the Newton-Lorentz equation.

The field solver

The most commonly used methods for solving Maxwell's equation belong to one of the following three categories:

FDM, FEM, SM

With the FDM, the continuous domain is replaced with a discrete grid of points, on which the electric and magnetic fields are calculated. Derivatives are then approximated with differences between neighboring grid-point values and thus PDEs are turned into algebraic equations.

Using FEM, the continuous domain is divided into a discrete mesh of elements. The PDEs are treated as an eigenvalue problem and initially a trial solution is calculated using basis functions that are localized in each element. The final solution is then obtained by optimization until the required accuracy is reached.

Also spectral methods, such as the fast Fourier transform, transform the PDEs into an eigenvalue problem, but this time the basis functions are high order and defined globally over the whole domain. The domain itself is not discretized in this case, it remains continuous.

Particle and field weighting

The name Particle in cell originates in the way that plasma macro-quantities are assigned to simulation particles (the particle weighting). Particles can be situated anywhere on the continuous domain, but macro-quantities are calculated only on the mesh points, just as the fields are. To obtain the macro-quantities, one assumes that the particles have a given shape determined by the shape function \[ S(x-X) \] 其中\(x\)是particle的坐标,\(X\)是观测点的坐标。也许最简单而且使用最广泛的形函数是CIC方法,是一个线性加权格式。不过不论是什么格式,形函数都必须满足:空间各向同性,电荷守恒,增加对于高阶项的精度。

fields仅仅在格点上计算出来,不能直接用来计算施加到particle上的力,必须通过场加权的方式插值得到, \[ E(x) = \sum_i E_i S(x_i - x) \] 下标\(i\)就是第\(i\)个网格点。为了确保作用到粒子上的力是自洽保持的,通过粒子位置去计算宏观量的方法,和从网格点的场值去插值粒子处性质的方法必须是一致的。首先,场插值算法必须使动量守恒的。

什么是Particle Mesh呢?就是

It is then necessary to map discrete values defined at the grid points onto the corpuscolar distribution of carriers, and vice versa.

这就叫作Particle Mesh Method。

  1. assign the charge to the mesh points;

  2. solve Poisson's equation on the grid;

  3. compute the components of the electric field from the mesh-defined potential;

  4. interpolate the field at the particle positions.

PM的输入是载流子电荷,输出是电场。

The gate electrode is modeled as an ideal Schottky contact, with a known barrier height. Then the potential is given by the difference of the applied voltage and the barrier height. The contact is simulated as a perfectly absorbing boundary. For the MESFET, under normal operating conditions, the region directly underneath the gate is completely depleted and very few electrons do actually reach the gate.