5.9 FFT solver for Poisson equation

The normalized one-dimensional Poisson equation is given by Eq. (93). For notation simplicity, omit the over-bar on ϕ and x, then Eq. (93) is written

d2ϕ
dx2 = − ρ.
(100)

This is a two-points boundary value problem. Two boundary conditions are needed to determine the solution. Assume the periodic boundary condition ϕ(0) = ϕ(L) and note that ϕ can contain an arbitrary constant. Thus the periodic boundary condition alone is sufficient to specify the electrical field. We use Fourier transformation method to solve Eq. (100). The Fourier transformation of the left-hand side of the above equation is written

∫ ∞                   ∫ ∞
    d2ϕ eikxdx  =  − k2    ϕeikxdx
 −∞ dx2                −∞
               =  − k2ˆϕ(k),                                 (101)
where ˆϕ is the Fourier transformation of ϕ. Using this, the Fourier transformation of Eq. (100) is written
      ˆρ(k)
ˆϕ(k) =-k2-,
(102)

where

   ∫ ∞
ˆρ =     ρ(x)eikxdx
     −∞
(103)

is the Fourier transformation of ρ. After ϕˆ is obtained, the electric potential ϕ is finally reconstructed via the inverse Fourier transformation

      ∫ ∞
ϕ =-1-    ˆϕ(k)e−ikxdk.
   2π  −∞
(104)

In the numerical implementation, the Fourier transformation in Eq. (103) and the inverse transformation in Eq. (104) are discretized by the Discrete Fourier Transformation (DFT), which is further evaluated by using the FFT algorithm (I use the FFTW library). Set up uniform grid-points in x-direction: xj = jΔ for j = 0,1,2,,N, as is shown in Fig. (3).


pict

Figure 3: One-dimensional spatial computational box and grids.

Let ρj = ρ(xj) and ϕj = ϕ(xj). Let ˆρ j and ˆϕ j denote the corresponding DFT. Using the sampled points ρj with j = 0,1,2,,N 1, we can obtain the DFT ˆρ j. Note that the corresponding wave-number k of ˆρ j (also for ϕˆ j) is given by k = j2π∕(NΔ) for j = 0,1,,N∕2 and k = (j N)2π∕(NΔ) for j = N∕2 + 1,,N 1 (this corresponds to the negative wave-number part). Use Eq. (102) and the corresponding expression of the wave-number, the discrete form of Eq. (102) is written

ˆϕj = ----ˆρj-----.
     [j2π∕(N Δ)]2
(105)

for j = 1,2,,N∕2, and

ˆϕj =--------ˆρj------2
    [(j − N )2π∕(N Δ)]
(106)

for j = N∕2 + 1,N∕2 + 2,,N 1. The j = 0 case is a special one because in this case k = 0 and k appears in the denominator of (102). Since the overall charge neutrality −∞ρdx = 0 implies ˆρ 0 = 0. we usually set ˆϕ 0 = 0. After obtaining ˆϕ j with j = 0,1,,N 1, we can obtain ϕj through the inverse DFT.

Knowing the electron potential ϕj, the electric field is obtained through the following central difference scheme

         |
Ej = − dϕ||    = − ϕj+1-−-ϕj−1.
       dx|x=xj       2Δ
(107)

The electric field at the boundary points are obtained by using the periodic boundary conditions of ϕ.

In the above we use Fourier transformation method to get the electric potential and then use finite difference scheme to calculate the electric field. This is a mixed way to calculate the electric field. We can use only Fourier transformation method to solve for the electric field. In terms of the electric field, Poisson equation (93) is written

 --
dE-= ρ.
dx
(108)

For notation simplicity, omit the over-bar on variables, the above equation is written

dE-= ρ.
dx
(109)

The Fourier transformation of the left-hand side of the above equation is written

∫ ∞ dE           ∫ ∞
    ---eikxdx  =       eikxdE
 −∞ dx            − ∞         ∫ ∞
              =  Eeikx|+∞ − ik     Eeikxdx
                       −∞      −∞
                     ∫ ∞   ikx
              =  − ik  −∞ Ee   dx                               (110)
                     ˆ
              =  − ik E,
where Ê is the Fourier transformation of E. Using this, the Fourier transformation of Eq. (109) is written
 ˆ  -ρˆ-
E = − ik,
(111)

The discrete form of Eq. (111) is similar to the form given in Eqs. (105) and (106), i.e.,

 ˆ   -----ρˆj-----
Ej = − i[j2π∕(NΔ )].
(112)

for j = 1,2,,N∕2, and

ˆE  = --------ˆρj--------
 j   − i[(j − N )2π∕(NΔ )]
(113)

for j = N∕2 + 1,N∕2 + 2,,N 1.