org
online simulations and more
Numerical Solution
of Poissons Equation
Prepared by
Dragica Vasileska
Associate Professor
Arizona State University
nanoHUB.org
online simulations and more
Poisson Equation
2 ( r ) = f (r )
9 It accounts for Coulomb carrier-carrier interactions in the
Hartree approximation
9 It is always coupled with some form of transport simulator
except when equilibrium conditions apply
9 It has to be frequently solved during the simulation procedure
to properly account for the fields driving the carriers in the
transport part
9 There are numerous ways to numerically solve this equation
that can be categorized into direct and iterative methods
1
nanoHUB.org
online simulations and more
Mesh Size
Regarding the grid set-up, there are several points that need to be
made:
9 In critical device regions, where the charge density varies
very rapidly, the mesh spacing has to be smaller than the
extrinsic Debye length determined from the maximum doping
concentration in that location of the device
k BT
LD =
N max e 2
9 Cartesian grid is preferred for particle-based simulations
9 It is always necessary to minimize the number of node points
to achieve faster convergence
9 A regular grid (with small mesh aspect ratios) is needed for
faster convergence
nanoHUB.org
online simulations and more
Example for Meshing
Since any differential equation can be recast into an integral
form, we consider the evaluation of the integral of the function
f(x)
f ( x) = exp x
f ( x )dx = exp x dx = 2
f ( x) dx = exp x dx = 2 x exp [ ix ]
i =0
2
nanoHUB.org
online simulations and more
Example for Meshing
2
2 10
Integral (Analytical value=2)
101
1.9
0
10
Error [%]
1.8 10
-1
-2
10
1.7
10-3
1.6 -4
10
-5
1.5 -4 10
-3 -2 -1 0 -3 -2 -1 0
10 10 10 10 10 10 10 10 10
Mesh Size Mesh size
From the results shown, we see that for mesh size 1E-3, the error is less
than 0.1% and the total number of mesh points is 10000.
nanoHUB.org
online simulations and more
Example for meshing
The function below is used to generate non-uniform mesh with constant
mesh aspect ratio r. Input parameters are initial mesh size (X0), total
number of mesh points (N) and the size of the domain over which we want
these mesh points distributed (XT).
3
nanoHUB.org
online simulations and more
Boundary Conditions
There are three types of boundary conditions that
are specified during the discretization process of the
Poisson equation:
Dirichlet (this is a boundary condition on the potential)
Neumann (this is a boundary condition on the derivative of
the potential, i.e. the electric field)
Mixed boundary condition (combination of Dirichlet and
Neumann boundary conditions)
nanoHUB.org
online simulations and more
1D Discretization
xi-1 xi xi+1
dxie
i +1 = i + i' dxie + i'' + O 3 ( x)
2
dx w
i 1 = i + i' dxiw + i'' i + O 3 ( x )
2
2 2 2
i'' = i 1 e w i + e i +1
dx ( dxi + dxi )
i
w w e
dxi dxi dxi ( dxiw + dxie )
Network for Computational Nanotechnology
4
nanoHUB.org
online simulations and more
1D Discretization, Contd
The resultant finite difference equations can be represented in a
matrix form Au= f, where:
Neumann x0 x1 x2 x3 x4 x5
Dirichlet
u = ( 0 , 1 , 2 , 3 , 4 , 5 ) , f = ( f 0 , f1 , f 2 , f 3 , f 4 , 5 ) ,
b0 2 c0
a b1 c1 0
1
A= where
a2 b2 c2
a3 b3 c3
0 a4 b4 c4
1
0
2 2 2
ai = ; bi = ; ci =
dxiw ( dxiw + dxie ) dxie dx iw dxie ( dx iw + dx ie )
Network for Computational Nanotechnology
nanoHUB.org
online simulations and more
2D Discretization
In 2D, the finite-difference discretization of the Poisson equation
leads to a five point stencil:
Va N=5,M=4
15 16 17 18 19
Dirichlet: 0,4,5,9,10,14,15,19
10 11 12 13 14 Neuman: 1,2,3,16,17,18
5 6 7 8 9
0 1 2 3 4 xi+N
dx in
dx iw dx ie
xi-1 xi xi+1
dx is
xi-N
Network for Computational Nanotechnology
5
nanoHUB.org
online simulations and more
2D Discretization, Contd
1 0 Va
b c d1 2e1 f
1 1 1 1
b2 c2 d2 2e2 2 f2
b3 c3 d3 2e3 3 f3
1 4 0
1 V
5 a
a6 b6 c6 d6 e6 6 f6
a7 b7 c7 d7 e7 7 f7
a8 b8 c8 d8 e8 8 f8
1 0
9 =
1 10 Va
a11 b11 c11 d11 e11 11 f11
a12 b12 c12 d12 e12 12 f12
a13 b13 c13 d13 e1313 f13
1 0
14
1 15 Va
2a16 b16 c16 d16 16 f16
2a17 b17 c17 d17 17 f17
2a18 b18 c18 d1818 f18
1 19 0
Dirichlet: 0,4,5,9,10,14,15,19
Neuman: 1,2,3,16,17,18
Network for Computational Nanotechnology
nanoHUB.org
online simulations and more
Electric Field
The expression for the electric field must account for the
boundary conditions. A popular scheme for the electric field
calculation is the centered difference scheme:
dx iw dx ie
E(x ) = ( x )
xi-1 xi xi+1
i 1 i +1
Ei =
dx iw + dx ie
1 i +1 i i i 1
Ei = +
2 dx ie dx iw
6
nanoHUB.org
online simulations and more
Solution Methods
The variety of methods for solving Poisson equation include:
Direct methods
Gaussian elimination
LU decomposition method
Iterative methods
Mesh relaxation methods
- Jacobi
- Gaus-Seidel
- Successive over-relaxation method (SOR)
- Alternating directions implicit (ADI) method
Matrix methods
- Thomas tridiagonal form
- Sparse matrix methods: Stones Strongly Implicit Procedure
(SIP), Incomplete Lower-Upper (ILU) decomposition method
- Conjugate Gradient (CG) methods: Incomplete Choleski
Conjugate Gradient (ICCG), Bi-CGSTAB
- MultiGrid (MG) method
Network for Computational Nanotechnology
nanoHUB.org
online simulations and more
Direct Methods
Direct methods
These methods are based on triangularization techniques,
that are methods to eliminate the unknowns in a systematic
way, so that one ends up with a triangular system, that can be
easily solved as follows: given a system Ux=f, where U is
upper-triangular,
7
nanoHUB.org
online simulations and more
Direct Methods, Contd
fn
xn =
un, n
f n 1 un 1, n x n
x n 1 =
un 1, n 1
...
f1 u1, n x n u1, n 1 x n 1 ... u1,2 x2
x1 =
u1,1
nanoHUB.org
online simulations and more
Gaussian Elimination
8
nanoHUB.org
online simulations and more
LU Decomposition
(B) LU Decomposition
This method is based on a decomposition of the matrix A into
a lower- and upper-triangular matrix: A=LU. The system Ax=f
is then equivalent to LUx=f, which decomposes into two
triangular sytems Ly=f and Ux=y.
nanoHUB.org
online simulations and more
LU Decomposition, Contd
If LU decomposition exists, then for a tri-diagonal matrix A,
resulting from the finite-difference discretization of the 1D
Poisson equation, one can write
a1 c1 1 1 c1
b a2 c2 1 2 c2
2 2
... ... ... = 3 ... ... ...
bn 1 a n 1 cn 1 ... ... ... c n 1
a n n 1 n
bn
bk
where 1 = a1 , k =
k 1
, k = ak k ck 1 , k = 2,3,..., n
g1 = f1 , g i = f i i g i 1 , i = 2,3,..., n,
g g ci xi +1
xn = n , xi = i , i = n 1,...,2,1
n i
Network for Computational Nanotechnology
9
nanoHUB.org
online simulations and more
Iterative Methods
Iterative methods
Iterative (or relaxation) methods start with a first approximation
which is successively improved by the repeated application (i.e.
the iteration) of the same algorithm, until a sufficient accuracy
is obtained.
Iterative methods are used most often for large sparse system of
equations, and always when a good approximation of the
solution is known.
nanoHUB.org
online simulations and more
Error Equation
10
nanoHUB.org
online simulations and more
Jacobi, Gauss-Seidel Methods
The expansion of Ax=f gives the relation
n
a ki x j + f k
j =1, j k
xk = , k = 1, 2,..., n ; a kk 0
a kk
Note that one does not use the improved values until after a
complete iteration. The closely related Gauss-Seidels method
solves this problem as follows:
k 1 n
a kj v ij+1 a kj v j + f k
i
j =1 j = k +1
vki +1 = , k = 1,2,..., n ; a kk 0
a kk
Network for Computational Nanotechnology
nanoHUB.org
online simulations and more
SOR Method
By a simple modification of Gauss-Seidels method it is often
possible to improve the rate of convergence. Following the
definition of residual ri = f - Avi, the Gauss-Seidel formula can
be written v ki +1 = vki + rki , where
k 1 n
a kj v ij+1 a kj v ij + f k
j =1 j =k
rki = , k = 1,2,..., n ; a kk 0
a kk
The iterative method
v ki +1 = vki + rki
is the so-called successive over-relaxation (SOR) method. Here, ,
the relaxation parameter, should be chosen so that the rate of
convergence is maximized. The rate of convergence of the SOR is
often surprisingly higher than the one of Gauss-Seidels method. The
value of depends on the grid spacing, the geometrical shape of the
domain, and the type of boundary conditions imposed on it.
Network for Computational Nanotechnology
11
nanoHUB.org
online simulations and more
Convergence
nanoHUB.org
online simulations and more
Convergence, Contd
12
nanoHUB.org
online simulations and more
Multi-Grid Method
Multi-grid method
two-grid iteration to solve Av=f on grid n
5.
n 1.
2. 4.
1. pre-smoothing on n
2. restriction of r to n-1
n-1
3. solution of Ae=r on n-1
4. prolongation of e to n
3.
5. post-smoothing on n
nanoHUB.org
online simulations and more
Coarsening Techniques
Coarsening techniques: importance of boundaries
18 points 17 points
initial grid
13
nanoHUB.org
online simulations and more
Coarsening Techniques, Contd
Coarsening techniques: importance of boundaries
nanoHUB.org
online simulations and more
Restriction
Restriction
Restriction is used to transfer the value of the residual from a grid
n to a grid n-1; relaxation is then a fine-to-coarse process.
In a two-dimensional scheme is convenient to use two different
restriction operators, namely the full-weighting and the half-
weighting. In the simple case of a homogeneous, square grid, one
has:
1 1 1 1
16 8 16 0 8
0
1 1 1 1 1 1
full-weighting half-weighting
8 4 8 8 2 8
1 1 1 0 1
0
16 8 16 8
The criteria to choose the most effective scheme in a given
situation depend on the relaxation method, as will be discussed
in the section devoted to relaxation.
14
nanoHUB.org
online simulations and more
Prolongation
Prolongation scheme
nanoHUB.org
online simulations and more
The Coarsest Grid Solver
The coarsest grid solver
15
nanoHUB.org
online simulations and more
Relaxation Scheme
Relaxation scheme
nanoHUB.org
online simulations and more
Relaxation Scheme, Contd
16
nanoHUB.org
online simulations and more
Relaxation Scheme, Contd
(2) Relaxation scheme: line Gauss-Seidel
nanoHUB.org
online simulations and more
Comparison of Relaxation Schemes
(3) Relaxation schemes: Comparison
0.2
0.1
/2 0.5 0.3
0. 1
0.7 05
0.2 .
0.9
t 0
0. 1
0.4 0.9
0.8 0.6
0. 3 0.6 0.1
0.2
/2
0.4
0.2
0.3
0.1
/2 0 /2 /2 0 /2
s s
17
nanoHUB.org
online simulations and more
Criterion for Convergence
18