Abstract
The electrostatic potential of a charge distribution is a solution of Poisson’s equation which, if mobile charges are taken into account, like for an electrolyte or semiconductor, turns into the Poisson–Boltzmann equation. In this chapter we discretize the Poisson and the linearized Poisson–Boltzmann equation by finite volume methods which are applicable even in case of discontinuous dielectric constant. We solve the discretized equations iteratively with the method of successive overrelaxation. The solvation energy of a charged sphere in a dielectric medium is calculated to compare the accuracy of several methods. This can be studied also in a computer experiment. Since the Green’s function is analytically available for the Poisson and Poisson–Boltzmann equations, alternatively the method of boundary elements can be applied, which can reduce the computer time, for instance for solvation models. A computer experiment simulates a point charge within a spherical cavity and calculates the solvation energy with the boundary element method.
Access provided by CONRICYT-eBooks. Download chapter PDF
Similar content being viewed by others
The electrostatic potential \(\varPhi (\mathbf {r})\) of a charge distribution \(\rho (\mathbf {r})\) is a solution Footnote 1 of Poisson’s equation
which, for spatially varying dielectric constant \(\varepsilon (\mathbf {r})\) becomes
and, if mobile charges are taken into account, like for an electrolyte or semiconductor, turns into the Poisson–Boltzmann equation
In this chapter we discretize the Poisson and the linearized Poisson–Boltzmann equation by finite volume methods which are applicable even in case of discontinuous \(\varepsilon \). We solve the discretized equations iteratively with the method of successive over-relaxation. The solvation energy of a charged sphere in a dielectric medium is calculated to compare the accuracy of several methods. This can be studied also in a computer experiment.
Since the Green’s function is analytically available for the Poisson and Poisson–Boltzmann equations, alternatively the method of boundary elements can be applied, which can reduce the computer time, for instance for solvation models. A computer experiment simulates a point charge within a spherical cavity and calculates the solvation energy with the boundary element method.
1 Poisson Equation
From a combination of the basic equations of electrostatics
the generalized Poisson equation is obtained
which can be written in integral form with the help of Gauss’ theorem
If \(\varepsilon (\mathbf {r}\)) is continuously differentiable, the product rule for differentiation gives
which for constant \(\varepsilon \) simplifies to the Poisson equation
1.1 Homogeneous Dielectric Medium
We begin with the simplest case of a dielectric medium with constant \(\varepsilon \) and solve (18.10) numerically. We use a finite volume method (Sect. 12.3) which corresponds to a finite element method with piecewise constant test functions. The integration volume is divided into small cubes \(V_{ijk}\) which are centered at the grid points (Fig. 18.1)
Integration of (18.10) over the control volume \(V_{ijk}\) around \(\mathbf {r}_{ijk}\) gives
\(Q_{ijk}\) is the total charge in the control volume. The flux integral is approximated by (12.85)
The derivatives are approximated by symmetric differences
which coincides with the simplest discretization of the second derivatives (3.40). Finally we obtain the discretized Poisson equation in the more compact form
which involves an average over the 6 neighboring cells
1.2 Numerical Methods for the Poisson Equation
Equation (18.15) is a system of linear equations with very large dimension (for a grid with \(100\times 100\times 100\) points the dimension of the matrix is \(10^{6}\times 10^{6}\) !). Our computer experiments use the iterative method (Sect. 5.5)
Jacobi’s method (5.121 on p. 80) makes all the changes in one step whereas the Gauss–Seidel method (5.124 on p. 80) makes one change after the other. The chessboard (or black red method) divides the grid into two subgrids (with \(i+j+k\) even or odd) which are treated subsequently. The vector \(d\mathbf {r}_{s}\) connects points of different subgrids. Therefore it is not necessary to store intermediate values like for the Gauss–Seidel method.
Convergence can be improved with the method of successive over-relaxation (SOR, 5.128 on p. 81) using a mixture of old and new values
with the relaxation parameter \(\omega \). For \(1<\omega <2\) convergence is faster than for \(\omega =1\). The optimum choice of \(\omega \) for the Poisson problem in any dimension is discussed in [225].
Convergence can be further improved by multigrid methods [226, 227]. Error components with short wavelengths are strongly damped during a few iterations whereas it takes a very large number of iterations to remove the long wavelength components. But here a coarser grid is sufficient and reduces computing time. After a few iterations a first approximation \(\varPhi _{1}\) is obtained with the finite residual
Then more iterations on a coarser grid are made to find an approximate solution \(\varPhi _{2}\) of the equation
The new residual is
Function values of \(\varPhi _{2}\) on the finer grid are obtained by interpolation and finally the sum \(\varPhi _{1}+\varPhi _{2}\) provides an improved approximation to the solution since
This method can be extended to a hierarchy of many grids.
Alternatively, the Poisson equation can be solved non-iteratively with pseudospectral methods [228, 229]. For instance, if the boundary is the surface of a cube, eigenfunctions of the Laplacian are for homogeneous boundary conditions \((\varPhi =0)\) given by
and for no-flow boundary conditions (\(\frac{\partial }{\partial n}\varPhi =0\)) by
which can be used as expansion functions for the potential
Introducing collocation points \(\mathbf {r}_{j}\) the condition on the residual becomes
which can be inverted with an inverse discrete sine transformation, (respectively an inverse discrete cosine transformation for no-flux boundary conditions) to obtain the Fourier components of the potential. Another discrete sine (or cosine) transformation gives the potential in real space.
1.3 Charged Sphere
As a simple example we consider a sphere of radius R with a homogeneous charge density of
The exact potential is given by
The charge density (18.27) is discontinuous at the surface of the sphere. Integration over a control volume smears out this discontinuity which affects the potential values around the boundary (Fig. 18.2). Alternatively we could assign the value \(\rho (\mathbf {r}_{ijk})\) which is either \(\rho _{0}\) (18.27) or zero to each control volume which retains a sharp transition but changes the shape of the boundary surface and does not conserve the total charge. This approach was discussed in the first edition of this book in connection with a finite differences method. The most precise but also complicated method divides the control volumes at the boundary into two irregularly shaped parts [230, 231].
Initial guess as well as boundary values are taken from
which provides proper boundary values but is far from the final solution inside the sphere. The interaction energy is given by (Sect. 18.5)
Calculated potential (Fig. 18.3) and interaction energy (Figs. 18.4, 18.5) converge rapidly. The optimum relaxation parameter is around \(\omega \approx 1.9\).
1.4 Variable \(\varepsilon \)
In the framework of the finite volume method we take the average over a control volume to discretize \(\varepsilon \) Footnote 2 and \(\varPhi \)
Integration of (18.7) gives
The surface integral is
Applying the midpoint rule (12.77) we find (Fig. 18.6)
The potential \(\varPhi \) as well as the product \(\varepsilon (\mathbf {r})\frac{\partial \varPhi }{\partial n}\) are continuous, therefore we make the approximation [230]
From this equation the unknown potential value on the face of the control volume \(\overline{\varPhi }(\mathbf {r}_{ijk}+\frac{1}{2}d\mathbf {r}_{s})\) (Fig. 18.6) can be calculated
which gives
Finally we obtain the discretized equation
which can be solved iteratively according to
1.5 Discontinuous \(\varepsilon \)
For practical applications models are often used with piecewise constant \(\varepsilon \). A simple example is the solvation of a charged molecule in a dielectric medium (Fig. 18.9). Here \(\varepsilon =\varepsilon _{0}\) within the molecule and \(\varepsilon =\varepsilon _{0}\varepsilon _{1}\) within the medium. At the boundary \(\varepsilon \) is discontinuous. In (18.40) the discontinuity is replaced by a smooth transition between the two values of \(\varepsilon \) (Fig. 18.7).
If the discontinuity of \(\varepsilon \) is inside a control volume \(V_{ijk}\) then (18.31) takes the arithmetic average
which corresponds to the parallel connection of two capacities (Fig. 18.8). Depending on geometry, a serial connection may be more appropriate which corresponds to the weighted harmonic average
1.6 Solvation Energy of a Charged Sphere
We consider again a charged sphere, which is now embedded in a dielectric medium (Fig. 18.9) with relative dielectric constant \(\varepsilon _{1}\).
For a spherically symmetrical problem (18.7) can be solved by application of Gauss’s theorem
For the charged sphere we find
The constant \(\varPhi (0)\) is chosen to give vanishing potential at infinity
The interaction energy is
Numerical results for \(\varepsilon _{1}=4\) are shown in Fig. 18.10.
1.7 The Shifted Grid Method
An alternative approach uses a different grid for \(\varepsilon \) which is shifted by h / 2 in all directions (Fig. 18.11) [232] or, more generally, a dual grid (12.74).
The value of \(\varepsilon \) has to be averaged over four neighboring cells to obtain the discretized equation
The shifted-grid method is especially useful if \(\varepsilon \) changes at planar interfaces. Numerical results of several methods are compared in Fig. 18.12.
2 Poisson–Boltzmann Equation
Electrostatic interactions are very important in molecular physics. Bio-molecules are usually embedded in an environment which is polarizable and contains mobile charges (\(Na^{+},K^{+},Mg^{++}, Cl^{-}\cdots )\).
We divide the charge density formally into a fixed and a mobile part
The fixed part represents, for instance, the charge distribution of a protein molecule which, neglecting polarization effects, is a given quantity and provides the inhomogeneity of the equation. The mobile part, on the other hand, represents the sum of all mobile charges (e is the elementary charge and \(Z_{i}\) the charge number of ion species i)
which move around until an equilibrium is reached which is determined by the mutual interaction of the ions. The famous Debye–Huckel [233] and Gouy–Chapman models [234, 235] assume that the electrostatic interaction
is dominant and the density of the ions \(n_{i}\) is given by a Boltzmann-distribution
The potential \(\varPhi (\mathbf {r})\) has to be calculated in a self consistent way together with the density of mobile charges. The charge density of the free ions is
and the Poisson equation (18.7) turns into the Poisson–Boltzmann equation [236]
2.1 Linearization of the Poisson–Boltzmann Equation
For small ion concentrations the exponential can be expanded
For a neutral system
and the linearized Poisson–Boltzmann-equation is obtained:
With
and the definition
we have finally
For a charged sphere with radius a embedded in a homogeneous medium the solution of (18.63) is given by
The potential is shielded by the ions. Its range is of the order \(\lambda _{Debye}=1/\kappa \) (the so-called Debye length).
2.2 Discretization of the Linearized Poisson Boltzmann Equation
To solve (18.63) the discrete equation (18.39) is generalized to [237]
If \(\varepsilon \) is constant then we iterate
3 Boundary Element Method for the Poisson Equation
Often continuum models are used to describe the solvation of a subsystem which is treated with a high accuracy method. The polarization of the surrounding solvent or protein is described by its dielectric constant \(\varepsilon \) and the subsystem is placed inside a cavity with \(\varepsilon =\varepsilon _{0}\) (Fig. 18.13). Instead of solving the Poisson equation for a large solvent volume another kind of method is often used which replaces the polarization of the medium by a distribution of charges over the boundary surface.
In the following we consider model systems which are composed of two spatial regions:
-
the outer region is filled with a dielectric medium (\(\varepsilon _{1})\) and contains no free charges
-
the inner region (“Cavity”) contains a charge distribution \(\rho (r)\) and its dielectric constant is \(\varepsilon =\varepsilon _{0}\).
3.1 Integral Equations for the Potential
Starting from the Poisson equation
we will derive some useful integral equations in the following. First we apply Gauss’s theorem to the expression [150]
with the yet undetermined function \(G(\mathbf {r}-\mathbf {r}')\). Integration over a volume V gives
Now choose G as the fundamental solution of the Poisson equation
which obeys
to obtain the following integral equation for the potential:
First consider as the integration volume a sphere with increasing radius. Then the surface integral vanishes for infinite radius (\(\varPhi \rightarrow 0\) at large distances) [150].
The gradient of \(\varepsilon (\mathbf {r})\) is nonzero only on the boundary surface (Fig. 18.14) of the cavity and with the limiting procedure (\(d\rightarrow 0)\)
we obtain
This equation allows to calculate the potential inside and outside the cavity from the given charge density and the potential at the boundary.
Next we apply (18.72) to the cavity volume (where \(\varepsilon =\epsilon _{0}\)) and obtain
From comparison with (18.73) we have
and the potential can be alternatively calculated from the values of its normal gradient at the boundary
This equation can be interpreted as the potential generated by the charge density \(\rho \) plus an additional surface charge density
Integration over the volume outside the cavity (where \(\varepsilon =\epsilon _{1}\epsilon _{0}\)) gives the following expression for the potential:
At the boundary the potential is continuous
whereas the normal derivative (hence the normal component of the electric field) has a discontinuity
3.2 Calculation of the Boundary Potential
For a numerical treatment the boundary surface is approximated by a finite set of small surface elements \(S_{i}, i=1\cdots N\) centered at \(\mathbf {r}_{i}\) with an area \(A_{i}\) and normal vector \(\mathbf {n}_{i}\) (Fig. 18.15). (We assume planar elements in the following, the curvature leads to higher order corrections).
The corresponding values of the potential and its normal derivative are denoted as \(\varPhi _{i}=\varPhi (\mathbf {r}_{i})\) and \(\frac{\partial \varPhi _{i}}{\partial n}=\mathbf {n}_{i}\text { grad}\varPhi (\mathbf {r}_{i})\). At a point \(\mathbf {r}_{j}^{\pm }\) close to the element \(S_{j}\) we obtain the following approximate equations:
These two equations can be combined to obtain a system of equations for the potential values only. To that end we approach the boundary symmetrically with \(\mathbf {r}_{i}^{\pm }=\mathbf {r}_{i}\pm d\mathbf {n}_{i}\). Under this circumstance
and we find
The integrals for \(i\ne j\) can be approximated by
The second integral has a simple geometrical interpretation (Fig. 18.16).
Since \(\text {grad}\frac{1}{|r-r'|}=-\frac{1}{|r-r'|^{2}}\frac{r-r'}{|r-r'|}\) the area element \(d\mathbf {A}\) is projected onto a sphere with unit radius. The integral \(\oint _{S_{j}}d\mathbf {A}\text { grad}_{r-}\frac{1}{|\mathbf {r_{j}}-\mathbf {r}_{j}^{-}|}\) is given by the solid angle of \(\mathbf {S}_{j}\) with respect to \(r'\). For \(r'\rightarrow r_{j}\) from inside this is just minus half of the full space angle of \(4\pi \). Thus we have
or
This system of equations can be used to calculate the potential on the boundary. The potential inside the cavity is then given by (18.73). Numerical stability is improved by a related method which considers the potential gradient along the boundary. Taking the normal derivative
In addition to (18.82) we have now
and the sum of the two equations gives
or finally
In terms of the surface charge density this reads:
This system of linear equations can be solved directly or iteratively (a simple damping scheme \(\sigma _{m}'\rightarrow \omega \sigma _{m}'+(1-\omega )\sigma _{m, old}'\) with \(\omega \approx 0.6\) helps to get rid of oscillations). From the surface charges \(\sigma _{i}A_{i}\) the potential is obtained with the help of (18.75).
4 Boundary Element Method for the Linearized Poisson–Boltzmann Equation
We consider now a cavity within an electrolyte. The fundamental solution of the linear Poisson–Boltzmann equation (18.63)
obeys
Inserting into Green’s theorem (18.69) we obtain the potential outside the cavity
which can be combined with (18.74, 18.79) to give the following equations [238]
For a set of discrete boundary elements the following equations determine the values of the potential and its normal derivative at the boundary:
The situation is much more involved than for the simpler Poisson equation (with \(\kappa =0\)) since the calculation of many integrals including such with singularities is necessary [238, 239].
5 Electrostatic Interaction Energy (Onsager Model)
A very important quantity in molecular physics is the electrostatic interaction of a molecule and the surrounding solvent [240, 241]. We calculate it by taking a small part of the charge distribution from infinite distance (\(\varPhi (r\rightarrow \infty )=0)\) into the cavity. The charge distribution thereby changes from \(\lambda \rho (r)\) to \((\lambda +d\lambda )\rho (r)\) with \(0\le \lambda \le 1\). The corresponding energy change is
Multiplication of the equations (18.93) by a factor of \(\lambda \) shows that the surface charges \(\lambda \sigma _{n}\) are the solution corresponding to the charge density \(\lambda \rho (r)\). It follows that \(\sigma _{n}(\lambda )=\lambda \sigma _{n}\) and hence
The second summand is the self energy of the charge distribution which does not depend on the medium. The first summand vanishes without a polarizable medium and gives the interaction energy. Hence we have the final expression
For the special case of a spherical cavity with radius a an analytical solution by a multipole expansion is available [242]
with the multipole moments
The first two terms of this series are:
5.1 Example: Point Charge in a Spherical Cavity
Consider a point charge Q in the center of a spherical cavity of radius R (Fig. 18.17). The dielectric constant is given by
Electric field and potential are inside the cavity
and outside
which in terms of the surface charge density \(\sigma \) is
with the total surface charge
The solvation energy (18.103) is given by
which is the first term (18.106) of the multipole expansion. Figure 18.18 shows numerical results.
Notes
- 1.
The solution depends on the boundary conditions, which in the simplest case are given by \(\lim _{|\mathbf {r}|\rightarrow \infty }\varPhi (\mathbf {r})=0\).
- 2.
But see Sect. 18.1.5 for the case of discontinuous \(\varepsilon \).
Author information
Authors and Affiliations
Corresponding author
Problems
Problems
Problem 18.1 Linearized Poisson–Boltzmann Equation
This computer experiment simulates a homogeneously charged sphere in a dielectric medium (Fig. 18.19). The electrostatic potential is calculated from the linearized Poisson Boltzmann equation (18.65) on a cubic grid of up to \(100^{3}\) points. The potential \(\varPhi (x)\) is shown along a line through the center together with a log-log plot of the maximum change per iteration
as a measure of convergence.
Explore the dependence of convergence on
-
the initial values which can be chosen either \(\varPhi (\mathbf {r})=0\) or from the analytical solution
-
the relaxation parameter \(\omega \) for different combinations of \(\epsilon \) and \(\kappa \)
-
the resolution of the grid
Problem 18.2 Boundary Element Method
In this computer experiment the solvation energy of a point charge within a spherical cavity (Fig. 18.20) is calculated with the boundary element method (18.93).
The calculated solvation energy is compared to the analytical value from (18.104)
where R is the cavity radius and s is the distance of the charge from the center of the cavity.
Explore the dependence of accuracy and convergence on
-
the damping parameter \(\omega \)
-
the number of surface elements (\(6\times 6\cdots 42\times 42)\) which can be chosen either as \(d\phi d\theta \) or \(d\phi d\,\cos \theta \) (equal areas)
-
the position of the charge
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this chapter
Cite this chapter
Scherer, P.O.J. (2017). Electrostatics. In: Computational Physics. Graduate Texts in Physics. Springer, Cham. https://doi.org/10.1007/978-3-319-61088-7_18
Download citation
DOI: https://doi.org/10.1007/978-3-319-61088-7_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-61087-0
Online ISBN: 978-3-319-61088-7
eBook Packages: Physics and AstronomyPhysics and Astronomy (R0)