원시데이터 수집 시스템
선정목록으로

Simple and Robust Solver for the Poisson-Boltzmann Equation

간접 관련 수소연료전지 · (7) MEA(막전극접합체) (6) PEM(고분자전해질막)(5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Baptista, M.
  2. Schmitz, R.
  3. Duenweg, B.
DOI
10.48550/arxiv.0810.0490
저널
arXiv (Cornell University)
발행년도
2022
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.0810.0490
토픽
Electrostatics and Colloid Interactions
OpenAlex ID
W6891741665

평가 내용

관련도
간접 관련
사업분야
수소연료전지 · (7) MEA(막전극접합체)
부 분야
(6) PEM(고분자전해질막), (5) 연료전지용 수분제어장치(가습기)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
Poisson–Boltzmann equation, electrostatic interactions, soft-matter, free energy functional, numerical procedure
판단 근거
이 논문은 소프트 매터 및 콜로이드 시스템에서의 정전기적 상호작용을 설명하는 Poisson-Boltzmann 방정식을 풀기 위한 수치 해석 알고리즘을 다룹니다. 이는 수소연료전지(PEMFC)의 핵심 구성 요소인 이온 교환막(PEM) 및 전해질 내 이온 전도 및 전기적 거동을 모델링하는 기초 원리와 맞닿아 있습니다.
R&D 활용 포인트
PEMFC용 고분자 전해질막(PEM) 내에서의 이온 이동, 전하 분포 및 전기적 특성을 예측하기 위한 수치 시뮬레이션 모델링 기법으로 활용 가능합니다.
평가 입력
본문 45,256자 중 30,032자 발췌

초록

A variational approach is used to develop a robust numerical procedure for solving the nonlinear Poisson-Boltzmann equation. Following Maggs et al., we construct an appropriate constrained free energy functional, such that its Euler-Lagrange equations are equivalent to the Poisson-Boltzmann equation. We then develop, implement, and test an algorithm for its numerical minimization, which is quite simple and unconditionally stable. The analytic solution for planar geometry is used for validation. Furthermore, some results are presented for a charged colloidal sphere surrounded by counterions.

본문 45,256자

본문 펼치기
Simple and Robust Solver for the Poisson–Boltzmann Equation M. Baptista, R. Schmitz, B. D¨unweg Max Planck Institute for Polymer Research Ackermannweg 10, 55128 Mainz, Germany (Dated: October 22, 2018) A variational approach is used to develop a robust numerical procedure for solving the nonlinear Poisson–Boltzmann equation. Following Maggs et al., we construct an appropriate constrained free energy functional, such that its Euler–Lagrange equations are equivalent to the Poisson–Boltzmann equation. This is a formulation that searches for a true minimum in function space, in contrast to previous variational approaches that rather searched for a saddle point. We then develop, implement, and test an algorithm for its numerical minimization, which is quite simple and unconditionally stable. The analytic solution for planar geometry is used for validation. Some results are presented for a charged colloidal sphere surrounded by counterions, and optimizations based upon Fast Fourier Transforms and hierarchical pre–conditioning are briefly discussed. PACS numbers: 02.60.Lj, 02.70.Bf, 41.20.Cv, 47.57.-s, 87.10.Ed I. INTRODUCTION In many soft-matter and biological systems electrostatic interactions have a strong influence on the physical behavior. A typical example are charge–stabilized colloidal dispersions [1], whose structure is mainly determined by the interplay between van der Waals attraction and electrostatic repulsion. A simplifying feature is the fact that it is often sufficient to describe the structure of the “cloud” of surrounding ions (counterions and salt ions) just in terms of Mean Field theory, in particular if the ions are monovalent. At the center of this theory is the well–known Poisson–Boltzmann equation, which, from the mathematical point of view, is a nonlinear partial differential equation. Analytical work in this field has been mainly confined to the linearized (Debye–H¨uckel) version, which however is often insufficient, in particular near strongly charged objects. This has prompted efforts to develop methods to solve the equation numerically, ideally in three dimensions and without restrictions on the underlying geometry or spatial symmetry. These are usually based on standard finite–difference [2] or finite– element [3] techniques (for a recent review see Ref. [4]), and have meanwhile reached a substantial degree of sophistication and complexity. Recently, however, Maggs [5] has put forward a completely new approach to electrostatics in soft–matter research, which bears a certain similarity to lattice gauge theories [6]. The central idea is to use the electric field E instead of the electrostatic potential ψ as the quantity on which the algorithm operates, and to view Gauss’ law ε∇· E = ρ as a constraint for the field configurations. On a lattice, it is then easy to construct an electric field (E) configuration which satisfies Gauss’ law for a given (arbitrary) charge density ρ. The hard part is rather the transversal part of the field, which should satisfy ∇× E = 0, but initially does not (unless one uses a sophisticated initialization procedure based upon solving the Poisson equation). This transversal degree of freedom can then be removed by local relaxations (this is the approach taken in the present paper), or integrated out by performing a Monte Carlo [5, 7] or Molecular Dynamics [8, 9, 10] simulation on the overall system. A crucial aspect of the method is to locally update both ρ and E simultaneously in a way that Gauss’ law is still satisfied after the update, i. e. the “constraint surface” is never left. The original Maggs approach is based upon a system of discrete charges whose statistical physics is treated in a consistent way. However, it is also possible to apply this to the Mean Field version of the theory, i. e. the Poisson– Boltzmann equation. The purpose of the present paper is to outline how this can be done in practice. In Sec. II we derive the method by re–formulating the Poisson– Boltzmann theory in terms of a free energy functional, which is minimized by using a Maggs–type algorithm. In contrast to previous formulations, this functional provides a true minimum, and therefore the procedure is very straightforward and simple, unconditionally stable, and has a rather modest storage requirement which scales only linearly with the number of grid points. In terms of computational speed, the method can probably not yet compete with the existing packages; however, it is reasonable to assume that more advanced versions that combine the basic methodology with acceleration techniques like adaptive mesh refinement and / or unstructured meshes, may become a very useful tool. Section III presents numerical results obtained with our current simple implementation, while Sec. IV discusses optimizations based upon Fast Fourier Transforms and hierarchical pre–conditioners. Finally, Sec. V finishes with some concluding remarks. II. DERIVATION OF THE ALGORITHM A. Poisson–Boltzmann Equation Consider a system of fixed charges, with total charge Ze (e > 0 denotes the elementary charge) dispersed in a solvent with dielectric constant ε. The system is confined to a three–dimensional finite domain of volume V . The charges can be distributed either in macroscopic particles or in any other kind of boundary. Furthermore, the domain contains counterions of total charge −Ze such that the system as a whole is charge neutral. The total number of counterions is N0, such that Z = −z0N0, where z0 is their valence. Furthermore, the presence of other ionic species (salt ions) is allowed if they satisfy charge neu α≥1 <sup>zαNα</sup> <sup>=</sup> <sup>0,</sup> <sup>where</sup> <sup>zα</sup> <sup>is</sup> <sup>the</sup> <sup>valence</sup> of the ionic species α and Nα is its number. The continuum theory provides equations for the con trality, i. e. if <sup>�</sup> centrations (particle number densities) cα(r) of each ionic species α and the electrostatic potential ψ(r). In the stationary regime (no time dependence) and in thermal equilibrium characterized by the thermal energy kBT, they take the form [1] kBT ∇ ln cα + ezα∇ψ = 0, (1) ε∇ <sup>2</sup> ψ + α ezαcα = 0. (2) which is an equation for ψ only. However, for the algorithm to be discussed below, it will be advantageous to rather consider the equivalent coupled set of equations (Eqs. 1, 2). B. Reduced Units The Poisson–Boltzmann equations can be rewritten in terms of nondimensional quantities, i. e. in reduced units. The argument of the exponential in Eq. 8 suggests the most natural way of rescaling the potential: ψ <sup>′</sup> = k <sup>eψ</sup> BT <sup>,</sup> (9) i. e. the reduced potential is the electrostatic energy of an elementary charge in units of the thermal energy. This leads to ∇ ln cα + zα∇ψ <sup>′</sup> = 0, (10) α zαcα = 0, (11) The first equation is the equilibrium version of the Nernst–Planck equation, which balances the diffusion current of ionic species α against the drift caused by the electric field E = −∇ψ. The second equation is the Poisson equation, taking into account all ionic species as a source term, while the fixed charges appear as boundary conditions. The total number of particles is obtained by integrating the concentration over the whole domain: ∇ <sup>2</sup> ψ <sup>′</sup> + 4πlB Nα = V cαdV, (3) where lB = e <sup>2</sup> /(4πεkBT ) is the Bjerrum length. Introducing a parameter κ <sup>−1</sup> as a characteristic length scale (see below), the gradient operator is rescaled via ∇ = κ∇ <sup>′</sup> . This allows writing the equations in the nondimensional form ∇ <sup>′</sup> ln c <sup>′</sup> α <sup>+ zα∇′ψ′</sup> <sup>=</sup> <sup>0,</sup> (12) ∇ <sup>′2</sup> ψ <sup>′</sup> + α zαc <sup>′</sup> α <sup>=</sup> <sup>0,</sup> (13) and the charge neutrality may then be expressed by where zα α V is the reduced concentration. In terms of the electric field E <sup>′</sup> = −∇ <sup>′</sup> ψ <sup>′</sup>, the equations are ∇ <sup>′</sup> ln c <sup>′</sup> α <sup>=</sup> <sup>zαE′,</sup> (15) c <sup>′</sup> α <sup>= 4πlBκ−2cα</sup> (14) with α≥1 zα cαdV = −Z, (4) cαdV = 0. (5) V α zαc <sup>′</sup> α <sup>,</sup> (16) By integrating Eq. 1 one obtains ∇ <sup>′</sup> - E <sup>′</sup> = α , (6) The normalization condition for the amount of species α is transformed to ∇ <sup>′</sup> × E <sup>′</sup> = 0. (17) cα = Aα exp - <sup>ezαψ</sup> kBT where the integration constant Aα has the dimension of a concentration, and, for normalization reasons, must have the value V <sup>′ c′</sup> α <sup>dV</sup> <sup>′</sup> <sup>= N ′</sup> α <sup>′</sup> <sup>′</sup> α (18) Nα Aα = V <sup>exp (−ezα</sup> result into Eq.� 2, V <sup>exp (−ezαψ/kBT ) dV</sup> <sup>.</sup> (7) with Inserting this result into Eq. 2, one obtains the Poisson– Boltzmann equation: Nα <sup>′</sup> <sup>= 4πlBκNα.</sup> (19) The choice of the parameter κ is completely immaterial for the mathematical formulation of the problem. It is only important to map the numerical results back onto = 0, (8) - <sup>ezαψ</sup> kBT ε∇ <sup>2</sup> ψ + ezαAα exp α a physical system, and therefore a matter of convention. For many applications, the choice while variation with respect to E yields E = −∇ψ. (27) The dependence on the unknown Lagrange multipliers is removed by taking the gradient of Eq. 26 and the curl of Eq. 27 to obtain ∇ ln cα + zα∇ψ = 0, (28) ∇× E = 0. (29) Finally, inserting Eq. 27 into Eq. 28 leads to ∇ ln cα = zαE. (30) In summary, the derived equations (Eqs. 30, 24, 29) are the desired set - in other words, the solution of the minimization problem is identical to the solution of the Poisson–Boltzmann equation. In this context, one should make a few important observations. Firstly, we note that solving the Euler– Lagrange equations will provide one and only one solution: It has been proven (by variational methods) that the Poisson–Boltzmann equation has one unique solution [12, 13]. Secondly, it is easy to show that the solution is indeed a local minimum: By writing E = E <sup>(0)</sup> + δE, (31) cα = c <sup>(0)</sup> α <sup>+ δcα,</sup> (32) κ <sup>2</sup> = 4πlB α <sup>z</sup> α <sup>2</sup> <sup>z</sup> α <sup>2</sup> <sup>Nα</sup> (20) V turns out to be quite useful: This is the natural screening parameter in the finite–volume version of linearized Poisson–Boltzmann theory (therefore it also appears in the corresponding treatment of asymmetric electrolytes [11]). In the case of only one monovalent ionic species (the counterions α = 0), this reduces to |Z| κ <sup>2</sup> = 4πlB (21) V <sup>.</sup> It should be noted that in this case N0 <sup>′</sup> <sup>= V</sup> <sup>′.</sup> From now on, we will be concerned with the problem of numerically solving the reduced set Eqs. 15–17. In what follows, the primes will be omitted, with the understanding that all quantities (including Nα and V ) are given in reduced units. C. Variational Approach Following the ideas of Maggs and Rosetto [5], the Poisson–Boltzmann equation can be re–formulated as a constrained variational problem, where a free energy functional is minimized. This functional is constructed such that its Euler–Lagrange equations are equivalent to Eqs. 15–17. Its form is where E <sup>(0)</sup>, c <sup>(0)</sup> α <sup>form the solution of the problem, and δE,</sup> δcα are small deviations which satisfy the constraints, i. e. zαδcα, (33) α ∇· δE = F = V f dV, (22) α f = 2 <sup>1</sup> cα ln cα − ψ zαcα 2 <sup>1</sup> <sup>E2 +</sup> α ∇· E − δcαdV = 0, (34) α α V one finds F = + V c <sup>(0)</sup> α <sup>(0)</sup> α <sup>ln c</sup> α <sup>(0)</sup> . (23) V α µα cα − <sup>Nα</sup> V V α dV The first term corresponds to the electrostatic energy and the second to the entropy. Gauss’ law and the mass normalization conditions are included as constraints, via Lagrange multipliers: The field ψ (r) is the electrostatic potential, while the numbers µα are the chemical potentials of the species α. The Euler–Lagrange equations for this variational problem will be derived next. Variation with respect to ψ and µα just recovers the constraint equations α α - 21 <sup>E(0)2 +</sup> α 21 <sup>δE2 +</sup> 2 <sup>1</sup> δc <sup>2</sup> α cα <sup>(0)</sup> dV + O �δc <sup>3�</sup> , (35) ∇· E = α zαcα, (24) i. e. small deviations from the solution will always increase the functional. Together with the uniqueness, this shows that the functional has one and only one minimum, which corresponds to the solution of the Poisson– Boltzmann problem. Therefore, a procedure that relaxes all degrees of freedom of the functional such that it is systematically decreased, while staying on the constraint surface, will ultimately run into the one and only minimum of the free energy landscape. The iterative procedure may be slow and hampered by small eigenvalues of the Hessian at the minimum, but such problems can be kept under control by careful convergence checks and variation of the number of iterations. A simple algorithm V cαdV = Nα. (25) Variation with respect to cα results in ln cα + 1 + ψzα − µα = 0, (26) that initializes the system on the constraint surface, keeps it there, and systematically decreases F by local updates of all non–constrained degrees of freedom will be outlined in Sec. II E. Since the constraints are always satisfied during the procedure, the Lagrange–multiplier terms in the functional may be omitted, such that it is simplified to V V - 21 <sup>E2 +</sup> α i. e. the quadratic form of the deviations is not positive– definite. It is natural to suspect that this lack of positive– definiteness causes various numerical difficulties in terms of stability, which therefore are intrinsically absent in the new formulation. D. Discretization The computational domain is a rectangular parallelepiped of size l1 × l2 × l3 with periodic boundary conditions. This box is discretized by a simple orthorombic (usually: cubic) lattice with sites r0 and lattice spacings ∆xi, i = 1, 2, 3 enumerating the Cartesian directions. The volume of a unit cell is thus ∆V = ∆x1 ∆x2 ∆x3. The concentrations cα are variables on the sites, while the electric field is associated with the links. The positions of the concentration fields are the vectors r0(n) = (∆x1n1, ∆x2n2, ∆x3n3), (45) where ni are integers. The field E1 is located at the positions r1(n) = (∆x1(n1 + 1/2), ∆x2n2, ∆x3n3) . (46) Similarly, the positions for E2 and E3 are r2(n) = (∆x1n1, ∆x2(n2 + 1/2), ∆x3n3), (47) r3(n) = (∆x1n1, ∆x2n2, ∆x3(n3 + 1/2)), (48) respectively. Furthermore, it is useful to define dV. (36) F = cα ln cα It should also be noted that previous approaches that were also based upon a free–energy functional (see, e. g., Ref. [14]), did not truly search for a minimum, but rather for a saddle point. These methods were not based upon a functional that involves the electric field, but rather one that depends on the electrostatic potential, <sup>1</sup> 2 <sup>(∇ψ)2 +</sup> α F = f dV (37) V f = - <sup>1</sup> cα ln cα + ψ zαcα α α α cα − <sup>Nα</sup> V µα α V , (38) where the µα are, as before, the Lagrange multipliers corresponding to the mass normalization conditions. However, in contrast to its meaning in Eqs. 22, 23, ψ is here not a Lagrange multiplier, but rather a degree of freedom. It is straightforward to show that the Euler– Lagrange equations of this problem are equivalent to the Poisson–Boltzmann equation. To show that this solution is indeed not a minimum but rather a saddle point, one again decomposes ψ and cα into the solution plus small deviations, ψ = ψ <sup>(0)</sup> + δψ, (39) cα = c <sup>(0)</sup> α <sup>+ δcα,</sup> (40) r <sup>′</sup> r <sup>′</sup> 1 <sup>(n)</sup> <sup>=</sup> <sup>(∆x1(n1</sup> <sup>−</sup> <sup>1/2), ∆x2n2, ∆x3n3),</sup> (49) r <sup>′</sup> 2 <sup>(n)</sup> <sup>=</sup> <sup>(∆x1n1, ∆x2(n2 −</sup> <sup>1/2), ∆x3n3),</sup> (50) r <sup>′</sup> 3 <sup>(n)</sup> <sup>=</sup> <sup>(∆x1n1, ∆x2n2, ∆x3(n3</sup> <sup>−</sup> <sup>1/2)) .</sup> (51) <sup>′</sup> 3 <sup>(n)</sup> <sup>=</sup> <sup>(∆x1n1, ∆x2n2, ∆x3(n3</sup> <sup>−</sup> <sup>1/2)) .</sup> (51) These definitions allow to approximate the functional by F = <sup>1</sup> ∆V 2 n n cα (r0(n)) ln cα (r0(n)), Ei <sup>2</sup> <sup>(ri(n))</sup> (52) 3 i=1 i=1 α with This yields F = (f0 + f2) dV + O + α n n V δcαdV = 0. (41) and to also discretize the divergence operator in a straightforward way: (∇· E) (r0(n)) = 3 i=1 (Ei (ri(n)) − Ei (ri <sup>′</sup> <sup>(n))) .</sup> 1 ∆xi α <sup>(0)</sup> (43) , (42) (53) Gauss’ law then reads i=1 V f0 = - <sup>1</sup> i=1 (Ei (ri(n)) − Ei (ri <sup>′</sup> <sup>(n))) =</sup> α �δc <sup>3�</sup> c <sup>(0)</sup> α <sup>(0)</sup> α <sup>ln c</sup> α <sup>(0)</sup> 3 i=1 α 2 �∇ψ <sup>(0)�2</sup> + α zαcα (r0(n)) . α + ψ <sup>(0) �</sup> (44) zαc <sup>(0)</sup> α <sup>(0)</sup> α <sup>,</sup> 1 ∆xi α (54) Introducing fluxes via f2 = - <sup>1</sup> 2 <sup>1</sup> <sup>(∇δψ)2 +</sup> 2 <sup>1</sup> α δc <sup>2</sup> α cα <sup>(0)</sup> α φ1 = E1∆x2∆x3, (55) φ2 = E2∆x3∆x1, (56) φ3 = E3∆x1∆x2, (57) α + δψ zαδcα, this is rewritten as 3 i=1 (φi (ri(n)) − φi (ri <sup>′(n))) = ∆V</sup> α zαcα (r0(n)) . i=1 α (58) Finally, the normalization condition for the amount of ionic species α is discretized as the interior of a particle). The nodes representing the volume where ions can move are marked as “moveable”. Initially, each ionic species is uniformly distributed over the “moveable” nodes. Choosing the correct amount of charges then automatically results in charge neutrality of the overall system. The next step consists in initializing the electric field so that it satisfies Gauss’ law for the initial charge distribution. One possibility is to solve the Poisson equation with some numerical method. This needs to be done only once, in the initialization. An alternative, based on charge neutrality, is to initialize each component by means of a recursion over the spatial dimensions [10], which is equivalent to applying Gauss’ law to linear chains of nodes. First the lattice is decomposed into a set of planes perpendicular to the x1–axis and it is required that E1 takes the same identical value for all links with identical x1– coordinate. Then in one (arbitrary) plane of links we set E1 = 0. Starting from there, we can then calculate E1 step by step in the subsequent planes of links, where the change in E1 is given by the plane–averaged charge density between the links. Assuming that the procedure is started at the charge plane x1 = 0, it reads E1(−0.5∆x1, n2∆x2, n3∆x3) = 0, (60) E1((n1 + 0.5)∆x1, n2∆x2, n3∆x3) = E1((n1 − 0.5)∆x1, n2∆x2, n3∆x3) + ∆x1 ⟨ρ⟩ (n1∆x1), (61) where ⟨ρ⟩ is the plane–averaged charge density at x1 = n1∆x1. Charge neutrality combined with the periodic boundary conditions ensures that this procedure will give consistent results after closing the one–dimensional loop. Then each plane is decomposed into a sequence of lines, perpendicular to the x1– and the x2–axis, and the analogous procedure is applied to obtain the field in x2– direction. The charges which occur here are the line averages, where however the plane averages have been subtracted (the latter have already been taken into account via E1). Finally, the lines are decomposed into sites, and E3 is determined from the remaining charges where both line and plane averages have been subtracted. For field changes, elementary closed loops on the faces of the unit cells (plaquettes) are considered. For the orthorombic lattice, these are comprised of four nodes and respective links, such that each node is connected to two plaquette links. Now, these four fields are modified in such a way that the flux on each link is changed by the same amount (taking into account the orientation along the closed loop). Therefore, Gauss’ law will still be satisfied after that move, since at every node there will be some more flux entering but also the same amount of flux leaving. Let us, for example, consider a plaquette perpendicular to the x3–axis, with a sequence of fields E1, E2 <sup>′</sup> <sup>,</sup> <sup>E</sup> 1 <sup>′</sup> <sup>,</sup> <sup>E2</sup> <sup>along</sup> <sup>the</sup> <sup>loop,</sup> <sup>where</sup> <sup>E1,</sup> <sup>E</sup> 1 <sup>′</sup> <sup>are</sup> <sup>positive</sup> <sup>if</sup> n cα (r0(n)) = <sup>Nα</sup> (59) ∆V <sup>.</sup> E. Algorithm The numerical minimization procedure starts from some configuration of the discretized fields cα and E which satisfies all the constraints, i. e. the normalization conditions for the ions, plus Gauss’ law. The algorithm then performs successive local changes in the electric fields and the concentrations, analogously to the Monte Carlo moves of Maggs and Rosetto [5]. These moves have the big advantage that they rigorously conserve the constraints. In contrast to Ref. [5], however, the moves are not stochastic, but rather deterministic, and constructed in such a way that they decrease the functional, and do this optimally. Since the free energy landscape of this problem has a simple structure (as discussed in Sec. II C), the procedure relaxes the fields into the one and only minimum, which is the solution of the Poisson–Boltzmann equation. The algorithm can be summarized as follows: 1. Distribute the fixed charges. 2. Classify the grid points. 3. Distribute the ionic species uniformly in the moveable nodes. 4. Initialize the electric field. 5. Perform the field moves for all the plaquettes (smallest closed loops) in the grid. 6. Perform the concentration moves for all pairs of adjacent moveable nodes. 7. Check if the changes in the functional caused by steps 5 and 6 are less than a given tolerance: if yes, then stop, otherwise, return to step 5. In the beginning, fixed charges and ionic species must be distributed over the grid. Fixed charges are usually associated with surfaces. Therefore elements of surface charge density must be mapped onto elements of volume charge density, so that they can be associated with some of the nodes. These nodes are then marked as “fixed” and no particles can enter or leave them after initialization. Further nodes may be marked as “fixed” if they are known to be empty (for example, if they represent E1 → E1 + δE1, (62) E2 <sup>′</sup> <sup>,</sup> <sup>E</sup> 1 <sup>′</sup> <sup>,</sup> <sup>E2</sup> <sup>along</sup> <sup>the</sup> <sup>loop,</sup> <sup>where</sup> <sup>E1,</sup> <sup>E</sup> 1 <sup>′</sup> <sup>are</sup> <sup>positive</sup> <sup>if</sup> the field points in positive x1–direction (and analogous for E2, E2 <sup>′</sup> <sup>).</sup> <sup>Then</sup> <sup>the</sup> <sup>field</sup> <sup>updates</sup> <sup>are</sup> <sup>given</sup> <sup>by</sup> 2 <sup>′</sup> <sup>).</sup> <sup>Then</sup> <sup>the</sup> <sup>field</sup> <sup>updates</sup> <sup>are</sup> <sup>given</sup> <sup>by</sup> E2 <sup>′</sup> <sup>→</sup> <sup>E</sup> 2 <sup>′</sup> <sup>+ δE</sup> 2 <sup>′</sup> <sup>,</sup> (63) E1 <sup>′</sup> <sup>→</sup> <sup>E</sup> 1 <sup>′</sup> <sup>+ δE</sup> 1 <sup>′</sup> <sup>,</sup> (64) E2 <sup>′</sup> E1 <sup>′</sup> <sup>→</sup> <sup>E</sup> 1 <sup>′</sup> <sup>+ δE</sup> 1 <sup>′</sup> <sup>,</sup> (64) E2 → E2 + δE2, (65) 0.008 0.006 0.004 0.002 or, in terms of fluxes, δφ1 = ∆x2∆x3δE1 = δφ, (66) δφ <sup>′</sup> 2 <sup>=</sup> <sup>∆x1∆x3δE</sup> 2 <sup>′</sup> <sup>= δφ,</sup> (67) δφ <sup>′</sup> 2 <sup>=</sup> <sup>∆x1∆x3δE</sup> 2 <sup>′</sup> <sup>= δφ,</sup> (67) δφ <sup>′</sup> 1 <sup>=</sup> <sup>∆x2∆x3δE</sup> 1 <sup>′</sup> <sup>= −δφ,</sup> (68) δφ <sup>′</sup> 1 <sup>=</sup> <sup>∆x2∆x3δE</sup> 1 <sup>′</sup> <sup>= −δφ,</sup> (68) δφ2 = ∆x1∆x3δE2 = −δφ, (69) analytic 256x8x8 512x8x8 1024x8x8 where the parameter δφ can be chosen arbitrarily without violating Gauss’ law. The associated change in the functional is given by 0 -20 <u>-10</u> <u>0</u> <u>10</u> <u>20</u> x 0.008 0.006 δF ∆V = �(∆x1) <sup>2</sup> + (∆x2) <sup>2�</sup> ∆V ∆x1 (E1 − E1 <sup>′</sup> <sup>)</sup> (δφ) <sup>2</sup> (70) + ∆V ∆x1 (E1 − E1 <sup>′</sup> + ∆V ∆x1 (E1 − E1 <sup>′</sup> <sup>) δφ</sup> + ∆V ∆x2 (E2 − E2 <sup>′</sup> <sup>) δφ,</sup> 2 <sup>′</sup> <sup>) δφ,</sup> which is minimized for δφ = <sup>1</sup> (71) (∆x1) <sup>2</sup> + (∆x2) <sup>2</sup> <sup>1</sup> ∆V 2 (∆x1) <sup>2</sup> 0.004 0.002 analytic 1024x8x8 1024x16x16 1024x32x32 × {∆x1 (E1 <sup>′</sup> <sup>−</sup> <sup>E1) −</sup> <sup>∆x2</sup> <sup>(E</sup> 2 <sup>′</sup> <sup>−</sup> <sup>E2)} .</sup> This yields the optimal values for the field changes. For concentration moves between two adjacent nodes (connected by a single link), Gauss’ law is also conserved if the electric flux is updated accordingly. Suppose that before the move the two adjacent nodes r <sup>(</sup> 0 <sup>A)</sup> and r <sup>(</sup> 0 <sup>B)</sup> have, respectively, concentrations c <sup>(A)</sup> and c <sup>(B)</sup> of some ionic species with valence z. Without loss of generality we may assume that node B has a larger index value than node A. The electric flux from node A to node B is then given by (∆V/∆l)E, where ∆l is the length of the link, and E the field on it. Now, a certain (positive or negative) amount δc is moved from A to B, i. e. c <sup>(A)</sup> → c <sup>(A)</sup> - δc, (72) c <sup>(B)</sup> → c <sup>(B)</sup> + δc. (73) Gauss’ law tells us that the flux should change by −∆V zδc, and this is the case for δE = −∆l z δc. (74) The resulting change in the functional is given by 0 -20 <u>-10</u> <u>0</u> <u>10</u> <u>20</u> x FIG. 1: Profile of the counterion concentration along the x– axis, for various grid resolutions as indicated by the legends. which must be solved numerically. By introducing c+ = <sup>1</sup> 2 c− = <sup>1</sup> 2 , (77) , (78) ξ = <sup>1</sup> 2 �c <sup>(A)</sup> + c <sup>(B)�</sup> �c <sup>(A)</sup> - c <sup>(B)�</sup> <sup>1</sup> 2 <sup>z∆l (z∆lδc −</sup> <sup>E),</sup> (79) the equation is transformed to E ξ + z∆lc+ - <sup>c−</sup> c+ which shows that it has exactly one solution (the slope of the left hand side is always positive). Since −1 < tanh ξ < 1, the solution will satisfy the condition 2 tanh ξ + (z∆l) <sup>2</sup> c+ = 0, (80) ∆F = ∆V E + <sup>1</sup> 2 2 <sup>1</sup> <sup>δE</sup> δE (75) 1 − <sup>δc</sup> c <sup>(A)</sup> - + c <sup>(B)</sup> ln 1 + <sup>δc</sup> c <sup>(B)</sup> + c <sup>(A)</sup> ln - δc ln <sup>c(A) −</sup> <sup>δc</sup> c <sup>(B)</sup> + δc c <sup>(B)</sup> + δc <sup>.</sup> 2 - 1 < − < 1, (81) + <sup>c−</sup> c+ E ξ − z∆lc+ In order to find the optimal value for δc, we minimize this expression. The result is a nonlinear equation, δc = <sup>c(A) −</sup> <sup>c(B) exp (−z∆l(E −</sup> <sup>z∆lδc))</sup>, (76) 1 + exp (−z∆l(E − z∆lδc)) 2 - 1 < − (z∆l) <sup>2</sup> c+ which is equivalent to c <sup>(A)</sup> - δc - 0, c <sup>(B)</sup> + δc - 0, such that δc will be in the physically admissible range. Finally, the shape of the left hand side guarantees that a Newton 15 0 −15 −15 0 15 x 0.25 0.2 0.15 0.1 0.05 0 0.03 0.02 256x8x8 512x8x8 1024x8x8 15 0 −15 −15 0 15 x 0.25 0.2 0.15 0.1 0.05 0 0.0 ~~1~~ 0 -20 <u>-10</u> <u>0</u> <u>10</u> <u>20</u> x FIG. 2: Relative errors of the concentration profiles, for different grid resolutions as indicated. iteration starting at ξ = 0 will always converge; hence, this rapid procedure was implemented. III. NUMERICAL RESULTS In this section, the feasibility of the present approach is demonstrated by two numerical examples. The choice of parameters is inspired by previous computer simulations on electrokinetics done in our group [15, 16, 17]. We therefore quote them here in unscaled “physical” units, where λ0 denotes our elementary length scale (the Lennard–Jones diameter in our simulations). All calculations are done with a Bjerrum length lB = 1.3λ0. The fixed charge distribution (boundary condition) consists of positive charges only, while there is only one ionic species, the monovalent counterions with valence z = −1. The resulting data are also given in “physical” units. A. Double Plane with Counterions Consider that the fixed charges are distributed in two infinite parallel plates, perpendicular to the x-axis, placed at x = −a and x = a. The surface charge density in each plate is σ. Furthermore, suppose that there are no salt ions and that the counterions (of valence z, concentration c(r)) are distributed in the region between the planes. Charge neutrality is given by Code A: 32 × 32 × 32 Code B: 32 × 32 × 32 15 0 −15 −15 0 15 x 0.6 0.5 0.4 0.3 0.2 0.1 0 15 0 −15 −15 0 15 x 0.6 0.5 0.4 0.3 0.2 0.1 0 Code A: 64 × 64 × 64 Code B: 64 × 64 × 64 15 0 −15 −15 0 15 x 1 0.8 0.6 0.4 0.2 0 15 0 −15 −15 0 15 x 1 0.8 0.6 0.4 0.2 0 Code A: 128 × 128 × 128 Code B: 128 × 128 × 128 FIG. 3: Counterion concentration for a charged colloid. = - <sup>d</sup> dψ <sup>(−A exp (−zψ)),</sup> which can be interpreted as Newton’s equation of motion of a particle with unit mass, whose coordinate is ψ and where the time corresponds to x. Hence, this equation can be solved via standard methods of classical mechanics [19]. The result is given by ψ = <sup>2</sup> z <sup>ln cos</sup> s <sup>x</sup> a a , (84) 2 c(x) = z <sup>2</sup> s <sup>2</sup> s <sup>2</sup> relateda <sup>2</sup> <sup>cos−2</sup> to <sup>�</sup> a s <sup>x</sup> , (85) where the parameter s is related to A via 2s <sup>2</sup> = Az <sup>2</sup> a <sup>2</sup> . The surface charge density is given by σ = <sup>dψ</sup> dx x=a ���� = − <sup>2</sup> z s a <sup>tan s;</sup> (86) S σds + V z c(r)dV = 0. (82) therefore, s can be obtained by solving a simple nonlinear equation numerically. The algorithm presented can be used to solve this one–dimensional problem. The planes are placed in the periodic box of size l1 × l2 × l3, at x1 = ±a. The amount of fixed charges, Ze, is distributed homogeneously in the planes, so that the surface charge density is σ = Ze/(2l2l3). The corresponding counterions are first distributed homogeneously in the region between the planes. The simulation box in x1 direction is somewhat larger than 2a, in order to be able to implement For this case, the problem is one–dimensional and its analytical solution is well–known [18]. Therefore, it is ideally suited to test the algorithm. In reduced units, the Poisson–Boltzmann equation is d <sup>2</sup> ψ = −Az exp (−zψ) (83) dx <sup>2</sup> ~~1~~ Cell model Plate 64x64x64 128x128x128 256x256x256 0.5 0 <u><mark>3</mark></u> <u>4</u> <u>5</u> <u><mark>6</mark></u> x FIG. 4: Counterion concentration profile along the x–axis for various grid resolutions as indicated by the legend. The continuous line is the solution of the 1d isotropic cell model. The dash–dotted line shows the concentration profile for a 2d charged plate with the same surface charge density. periodic boundary conditions in this direction. Beyond the charged planes, both the concentration and the electric field vanish. Due to the periodic boundary conditions in x2 and x3 direction, the system is translationally invariant in these directions, and hence the solution is one–dimensional. The calculations were performed for l1 = l2 = l3 = 32λ0, a = 15λ0, Z = 60, and different grid sizes. The agreement between the simulation and the analytic expression is quite good, see Fig. 1, and increases with the grid resolution in x direction. Increasing the grid resolution in the orthogonal directions has no effect, as expected (see Fig. 1, lower part). Figure 2 shows the relative error for different resolutions, defined by (87) ����, from 0.0 ~~1~~ x-axis diagonal 0.005 0 <u>10</u> <u>20</u> x FIG. 5: Electric field E along the x–axis and along the (111) diagonal for a grid resolution of 256 <sup>3</sup> . and various resolutions were used. A colloidal sphere of radius r = 3λ0 and valence Z = 60 was placed at the center of the box, and the counterions were initially distributed uniformly over the outer space. Two independent versions of the algorithm were implemented, one in C++ [20] and another one in C. Runs for grids of different sizes were done on an Intel Core 2 Duo E6600 FSB 1066 2x2.4 Ghz, with 4GB RAM. The algorithm was run until the change in the functional reached a value smaller than 10 <sup>−8</sup> . Performance results are summarized in Table I. The pictures in Fig. 3 show a two–dimensional cut of the counterion concentration in a plane perpendicular to the z–axis, while in Fig. 4 one–dimensional cuts (along the x–direction of the simulation box) are shown. The data show that near the surface of the charged colloid the discretization effects due to the cubic grid are quite large; nevertheless the data for the 256 <sup>3</sup> grid seem reasonably well converged to the continuum limit. The concentration profiles in (100) direction and in (111) direction are very close (i. e. within the resolution of the plot the curves coincide - these data have however not been included for the sake of clarity of the plot). Therefore one should expect that the solution is essentially identical to one obtained with strict spherical symmetry. This is indeed the case, as a comparison of the concentration profile with the corresponding solution of the spherically symmetric Poisson–Boltzmann cell model shows (see Fig. 4). In the latter, the cubic simulation cell is replaced by a spherical cell of the same volume, and the Poisson– Boltzmann equation is solved for the radial coordinate. In our calculations, this was done by transforming Eq. 8 to spherical coordinates, and then to a set of two coupled first–order differential equations (one for the potential, one for the field). This set was solved by a simple integrator analogous to the velocity Verlet scheme known from Molecular Dynamics [21], using a step size of ∆r = 10 <sup>−4</sup> (in reduced units), and integrating from the colloid ra relative error = ca(x) − cnum(x) ca(x) counterion���� ca(x) where ca(x) denotes the counterion concentration from the analytic solution and cnum(x) is the numerical result. B. Colloidal Particle in a Box In this case a colloidal particle, modeled by a sphere of radius r, is placed at the center of the periodic box of size l1 × l2 × l3. The sphere carries a total charge of Ze, uniformly distributed over its surface. In the simulation, the fixed charges must be interpolated onto the nodes of the grid. The simplest way is to generate M ≫ 1 random points distributed uniformly over the sphere surface. For each point, a (volume) charge density of Ze/(M ∆V ) is added to the closest grid node. These nodes are marked as fixed. The calculations were performed for a cubic box of sides l1 = l2 = l3 = 30λ0. Grids with cubic symmetry Code A (C++) Code A (C++) Code B (C) Code B (C) Grid Resolution Time (s) Memory (%) Time (s) Memory (%) 32 × 32 × 32 30 0.2 30 0.1 64 × 64 × 64 836 0.5 844 0.5 128 × 128 × 128 20701 2.9 20574 3.6 256 × 256 × 256 381371 22.5 389030 24.4 Iterations Functional Iterations Functional 32 × 32 × 32 642 1114.83 634 1113.88 64 × 64 × 64 2265 1024.14 2226 1024.19 128 × 128 × 128 7206 957.63 7038 957.63 256 × 256 × 256 20323 923.85 19711 924.70 TABLE I: Performance data for our two basic implementations. dius outwards. The constant A appearing in Eq. 8 was determined self–consistently by a shooting procedure, using the requirement that the electric field must vanish at the outer radius, as a result of Gauss’ law and the overall charge neutrality. The thus–determined profile agrees quite well with the one obtained from our algorithm for the finest resolution. Nevertheless, the solution for the cubic geometry does exhibit some anisotropy that, by construction, is absent in the cell model. This is essentially invisible in the concentration profile, but clearly observable in the electric field profile, as shown in Fig. 5, where the decays in (100) and (111) direction are compared. In the immediate vicinity of the colloidal surface, one may view the geometry as effectively planar. For a planar surface, the solution is characterized by the so–called Gouy–Chapman length [22]. In our reduced units, this length has the value 0.044, which should be compared to the colloid radius (0.5728), and the lattice spacing (0.045 for the 128 <sup>3</sup> grid). The planar solution is shown in Fig. 4 (dash–dotted line); it also agrees reasonably well with the profiles from our algorithm. Altogether, the data indicate that a lattice spacing of roughly half a Gouy– Chapman length is small enough to yield a reasonably well converged solution. IV. SPEEDUPS As one sees from Tab. I, the number of necessary iterations and the amount of CPU time are quite large. We have therefore looked for strategies to speed up the procedure without sacrificing the basic formulation that provides intrinsic stability. One possibility is to remove the rotational component of the electric field not by means of plaquette moves but rather by solving the Poisson equation. Within the chosen discretization scheme, the electrostatic potential needs to be an object associated with the sites, such that the electric field on a link is obtained by simply taking the potential difference between the adjacent sites. This leads to the simplest pos sible finite–difference scheme for the Poisson equation, which can be solved efficiently and in a stable way by using a Fast Fourier Transform (FFT) and the appropriate lattice Green’s function [23]. This has the advantage that one single lattice sweep not only reduces the rotational component (as is the case for the plaquette moves) but rather eliminates it completely. Therefore the FFT promises to increase the convergence speed. An easy implementation is possible using the well–known and efficient fftw3 library routine [24]. It should be noted that the link moves, which update the concentrations and the fields simultaneously, remain unchanged, such that the procedure still stays strictly on the constraint surface. In a first implementation, we eliminated all plaquette moves and replaced them with FFT sweeps done during initialization as well as subsequently after every 25th link sweep. As seen from Tab. II, this improves the efficiency roughly by a factor of 1.1 . . . 2. These results were obtained on the same computer as those of Tab. I. Furthermore, we can tackle the slowdown that comes from the fact that the ions have to be moved by site–by– site hops throughout the system (“hydrodynamic slowing down”). To this end, we first run the calculation on a rather coarse grid (in practice, we started with 8 × 8 × 8), such that most of the necessary “mass transport” is already done in that preliminary run. Starting from there, we go to a finer grid (in practice, we reduced the lattice spacing in all three directions by a factor of two) and linearly interpolate the output of the previous run onto that grid. Then the free energy is relaxed again; the output of that run is interpolated onto a yet finer grid, and so on. Obviously, this can be done rather easily by a straightforward recursion, until the desired grid resolution is reached. The runs before the finest resolution may then be viewed as a “pre–conditioner”. This optimization yields another speedup by roughly 25%, as seen from Tab. II. These are obviously two rather simple optimizations, which do not interfere with the basic data structure of the simple Cartesian grid. Further optimizations, which are however much more complicated, are possible by (i) Pure FFT Pure FFT FFT + pre–conditioner FFT + pre–conditioner Grid Resolution Time (s) Number of iterations Time (s) Number of iterations 32 × 32 × 32 14 297 11 242 64 × 64 × 64 409 1150 331 888 128 × 128 × 128 12180 4427 9744 3421 256 × 256 × 256 354783 16766 273538 12430 TABLE II: Performance data for our two speeded–up implementations. Note that the data for the runs with pre–conditioner mean (i) CPU time for the overall procedure, and (ii) number of iterations in the final run with the finest resolution. adaptive mesh refinement (i. e. a fine resolution is only used in those regions where the fields vary strongly), and (ii) using finite–element–type unstructured grids. Such more advanced approaches would be based upon constructing the dual (Voronoi) lattice in order to define and calculate the fluxes. While this is expected to yield further substantial speedups, this was not attempted here, and is rather mentioned as a suggestion for the larger community. V. CONCLUDING REMARKS Variational techniques were used to develop an algorithm for the Poisson–Boltzmann equation. The required amount of memory scales linearly with the system size. In our first simple implementation, all moves are local. This leads to fast memory access and fast calculations at each move. Furthermore, the algorithm can be easily parallelized. On the other hand, the charges need time to move between distant nodes. In fact, while the time spent on each move is essentially constant, the total number of sweeps required depends highly on how large a grid is swept. Considerable speedups were possible by using FFTs and a hierarchical pre–conditioner, but the basic “hydrodynamic slowing down” remains still present. Further speedups are likely to be possible by adaptive mesh refinement and by using unstructured grids. Existing algorithms based on standard discretizations of the differential operators are probably significantly [1] W. B. Russel, D. A. Saville, and W. R. Schowalter, Col loidal Dispersions (Cambridge University Press, Cambridge, 1989). [2] W. Rocchia, E. Alexov, and B. Honig, J. Phys. Chem. B 105, 6507 (2001). [3] M. Holst, N. Baker, and F. Wang, J. Comp. Chem. 21, 1319 (2000). [4] B. Z. Lu, Y. C. Zhou, M. J. Holst, and J. A. McCammon, Commun. Comp. Phys. 3, 973 (2008). [5] A. C. Maggs and V. Rossetto, Phys. Rev. Lett. 88, 196402 (2002). [6] A. Duncan, [arXiv:hep-lat/0609064.](http://arxiv.org/abs/hep-lat/0609064) [7] A. C. Maggs, J. Chem. Phys. 117, 1975 (2003). [8] J. Rottler and A. C. Maggs, Phys. Rev. Lett. 93, 170201 faster than even the fastest of our current implementations. Nevertheless, the approach that we have outlined in the present paper has the inherent advantage that its mathematical formulation provides intrinsic stability. This is mainly due to the fact that the free energy functional is formulated in terms of the electric field instead of the electrostatic potential, which provides a search for a true minimum in function space, rather than for a saddle point. As a result, the algorithm is very robust, in the sense that it will always converge to the solution, and at every iteration it approaches the solution more closely. Furthermore, the essential conservation laws that are at the heart of electrostatics - conservation of mass and conservation of electric flux - are built into the formulation with machine accuracy. We believe that these are fundamental advantages directly related to the underlying physics of the problem, and we consider them as much more important than implementation details. The Maggs formulation provides a new way of thinking about electrostatics, and we hope that this, in combination with existing numerical “technology”, will in the future bring about very useful algorithms. Acknowledgments This work was funded by the SFB TR 6 of the Deutsche Forschungsgemeinschaft. Stimulating discussions with B. Li are gratefully acknowledged. (2004). [9] J. Rottler and A. C. Maggs, J. Chem. Phys. 120, 3119 (2004). [10] I. Pasichnyk and B. D¨unweg, J. Phys. Cond. Matt. 16, S3999 (2004). [11] B. Beresford-Smith, D. Y. C. Chan, and D. J. Mitchell, J. Coll. Interf. Sci. 105, 216 (1985). [12] M. J. Holst, The Poisson–Boltzmann Equation, see [http://ccom.ucsd.edu/˜mholst/pubs/dist/hols94d.pdf.](http://ccom.ucsd.edu/~mholst/pubs/dist/hols94d.pdf) [13] R. Duan, T. Yang, and C. Zhu, J. Math. Anal. Appl. 327, 425 (2007). [14] J. Che, J. Dzubiella, B. Li, and J. A. McCammon, J. Phys. Chem. B 112, 3058 (2008). [15] V. Lobaskin, B. D¨unweg, and C. Holm, J. Phys. Cond. Matt. 16, S4063 (2004). [16] V. Lobaskin et al., Phys. Rev. Lett. 98, 176105 (2007). [17] B. D¨unweg, V. Lobaskin, K. Seethalakshmy-Hariharan, and C. Holm, J. Phys. Cond. Matt. 20, 404214 (2008). [18] S. Engstrom and H. Wennerstrom, J. Phys. Chem. 82, 2711 (1978). [19] L. D. Landau and E. M. Lifshitz, Course of Theoretical Physics 1: Mechanics (Butterworth–Heinemann, Oxford, 2001). [20] see the eke project, [http://code.google.com/p/eke/.](http://code.google.com/p/eke/) [21] M. P. Allen and D. J. Tildesley, Computer Simulation of Liquids (Oxford University Press, Oxford, 1989). [22] A. Y. Grosberg, T. T. Nguyen, and B. I. Shklovskii, Rev. Mod. Phys. 74, 329 (2002). [23] W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling, Numerical Recipes (Cambridge University Press, Cambridge, 1986). [24] M. Frigo and S. G. Johnson, Proceedings of the IEEE 93, 216 (2005).

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.