www.icp.uni-stuttgart.de Simulating Soft Matter 2017: The Lattice Electrokinetics Algorithm 2017-10-10 1 / 27 Institute for Computational Physics University of Stuttgart The Lattice Electrokinetics Algorithm Michael Kuron, Georg Rempfer October 10th, 2017 Diffusion
28
Embed
The Lattice Electrokinetics Algorithmespressomd.org/.../uploads/2017/10/summer_school_2017_electroki… · ¢ Electrophoresis, Electro-osmotic flow, dynamics of colloids and polymers
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
2017-10-10 2 / 27Institute for Computational PhysicsUniversity of Stuttgart
IntroductionApplication¢ Charge transport in solution¢ Electrophoresis, Electro-osmotic flow, dynamics of colloids
and polymers in solution, sedimentation, …
Method¢ Separation of time scales à treat solute ions as continuum¢ More efficient than explicit ions because these are slow at
sufficiently sampling the volume outside the Debye layer¢ Time-dependent Poisson-Boltzmann solver¢ Exploit lattice-Boltzmann’s efficiency for hydrodynamics¢ Performance independent of salt concentration
The study of the dynamics of suspensions of chargedparticles is interesting both because of the subtle physicsunderlying many electrokinetic phenomena and because ofthe practical relevance of such phenomena for the behaviorof many synthetic and biological complex fluids.1,2 In par-ticular, electrokinetic effects can be used to control the trans-port of charged and uncharged molecules and colloids, usingelectrophoresis, electro-osmosis, and related phenomena.3 Asmicro-fluidic devices become ever more prevalent, there arean increasing number of applications of electro-viscous phe-nomena that can be exploited to selectively transport mate-rial in devices with mesoscopic dimensions.4
In virtually all cases of practical interest, electroviscousphenomena occur in confined systems of a rather complexgeometry. This makes it virtually hopeless to apply purelyanalytical modeling techniques. But also from a molecular-simulation point of view electroviscous effects present a for-midable challenge. First of all, the systems under consider-ation always contain at least three components; namely asolvent plus two !oppositely charged" species. Then, there isthe problem that the physical properties of the systems ofinterest are determined by a number of potentially differentlength scales !the ionic radius, the Bjerrum length, theDebye–Huckel screening length and the characteristic size ofthe channels in which transport takes place". As a result,fully atomistic modeling techniques become prohibitivelyexpensive for all but the simplest problems. Conversely,standard discretizations of the macroscopic transport equa-
tions are ill-suited to deal with the statistical mechanics ofcharge distributions in ionic liquids, even apart from the factthat such techniques are often ill-equipped to deal with com-plex boundary conditions.
In this context, the application of mesoscopic !‘‘coarse-grained’’" models to the study of electrokinetic phenomenain complex fluids seem to offer a powerful alternative ap-proach. Such models can be formulated either by introducingeffective forces with dissipative and random components, asin the case of dissipative particle dynamics !DPD",5 or bystarting from simplified kinetic equations, as is the case withthe lattice-Boltzmann method !LB".
The problem with the DPD approach is that it necessar-ily introduces an additional length scale !the effective size ofthe charged particles". This size should be much smaller thanthe Debye screening length, because otherwise real charge-ordering effects are obscured by spurious structural correla-tions; hence, a proper separation of length scales may bedifficult to achieve. A lattice-Boltzmann model for electro-viscous effect was proposed by Warren.6 In this model, thedensities of the !charged" solutes are treated as passive scalarfields. Forces on the fluid element are mediated by thesescalar fields. A different approach was followed in Ref. 7,where solvent and solutes are treated on the same footing!namely as separate species". This method was then extendedto couple the dynamics of charged colloids to that of theelectrolyte solution. As we shall discuss below, both ap-proaches have practical drawbacks that relate to the mixingof discrete and continuum descriptions.
The LB model that we introduce below appears at firstsight rather similar to the model proposed by Warren. How-ever, the underlying philosophy is rather different. We pro-
2017-10-10 17 / 27Institute for Computational PhysicsUniversity of Stuttgart
Boundary ConditionsFixed objects: single colloid / colloid crystal, polymer in fixed conformation, walls, …¢ Impermeable to solute: set flux to zero¢ Fluid sticks to them: no-slip boundaryMoving objects: multiple (moving) colloids or polymers¢ Object much lager lattice spacing: moving boundary¢ Object size similar to lattice spacing: force coupling Reactive surfaces: catalysts¢ Surface cells convert solute species into another¢ Non-zero flux boundary
2017-10-10 18 / 27Institute for Computational PhysicsUniversity of Stuttgart
ImplementationsESPResSo¢ Soft matter simulation tool from the University of Stuttgart¢ EK code developed by Georg¢ Easiest to use, GPGPU implementation¢ Some new innovative features (grid refinement, particle coupling, thermalization)¢ Tutorial in the afternoonwaLBerla¢ Lattice-Boltzmann HPC framework from FAU Erlangen¢ EK code developed by me¢ Other new innovative features (grid refinement, moving boundaries, reactions)
2017-10-10 23 / 27Institute for Computational PhysicsUniversity of Stuttgart
Chemical Reactions / Self-ElectrophoresisBulk Reactions¢ Convert ions of reactant species into ions of product species¢ Input parameters: stoichiometric ratio (reaction equation) and reaction rate
Boundary Reactions¢ Take place at a colloid’s surface, replace the no-flux boundary condition¢ Typically used for catalytic reactions
2017-10-10 24 / 27Institute for Computational PhysicsUniversity of Stuttgart
Coupling to Moving Particles¢ Similar to Ladd boundaries in LB¢ What to do with solute ions in cells that
get claimed/vacated by a particle?
6
T = 0
~v
T = 0.25
~v
T = 0.5
~v
T = 0.75
~v
T = 1
~v
T = 1.25
~v
Figure 1. Illustration of the mass conservation modificationto the Ladd boundary scheme to make it usable for EK. Cellswhose center is inside the particle are considered to be bound-ary nodes. The arrows indicate how solute is drawn intovacated cells (panes 2, 3, and 6) and expelled from newly-overlapped cells (panes 4 and 5).
during the time steps after a cell has been claimed orvacated. To reduce these effects, we propose a partialvolume scheme, which is illustrated in Fig. 2.
In the following, (r, t) is a field describing the volumefraction of the cell at r that is overlapped by a particle,with = 1 meaning that the cell is completely insidethe particle and = 0 completely outside. In the cal-culation of the diffusive fluxes (18), the concentrationsare replaced with ones that take into account that all so-lute resides in the non-overlapped part of the cells. Toprevent the resulting diffusive fluxes from diverging as ! 1, we renormalize them by scaling them with thevolume. This leads to the following modified expressionfor the flux:
jdiff
ki
(r ! r+ c
i
, t)
=
D
k
agrid
✓⇢k
(r, t)
1� (r, t) �⇢k
(r+ c
i
, t)
1� (r+ c
i
, t)
◆
� Dk
zk
e
2kB
Tagrid
(1 + 2p2)
✓⇢k
(r, t)
1� (r, t)
+⇢k
(r+ c
i
, t)
1� (r+ c
i
, t)
◆⇥ (�(r, t)� �(r+ c
i
, t))
�
⇥ (1� (r, t)) (1� (r+ c
i
, t)) . (23)
With this change, refilling vacated cells as per Eqs. (21)and (22) is no longer necessary. They can be set to zeroconcentration and will be filled up by the diffusive fluxagain as increases. We determine numerically bysub-dividing each cell into 8 equally-sized cells and de-termining how many of them are completely inside andcompletely outside the particle. For those cells that areneither, the subdivision is recursively repeated up to amaximum depth of 4. Expelling solute from a cell thatis claimed by a particle is, however, still necessary —even with the modified expression for the flux — as the
T = 0
~v
T = 0.1
~v
T = 0.2
~v
T = 0.3
~v
T = 0.4
~v
T = 0.5
~v
Overlapped volume : 0 1
Figure 2. Illustration of the partial volume scheme for mov-ing boundaries in EK. The shading of the cells inside theparticle corresponds to the overlapped volume to indicatehow the particle’s charge is distributed across the cell layerat its surface. In the calculation of the diffusive flux, the con-centrations are scaled with 1 � to determine the effectiveconcentrations.
cell is not necessarily completely empty by the time itis claimed. The expelled amount of solute with Eq. (23)is much smaller than with Eq. (18) and thus the effectof this sudden change on the simulation is reduced toacceptable levels.
One further source of sudden variations in solute fluxesis the change in electrostatic potential when the vol-ume across which a particle’s charge is distributed variesdue to the fluctuation in the number of boundary cells.Therefore, when calculating the electrostatic potential,each particle’s total charge Q = Ze is distributed amongall cells that are at least partially overlapped by thatparticle:
⇢b
(r, t) = Ze (r, t)
Vp
, (24)
with Vp
the particle’s (non-discrete) volume. Inhomo-geneous charge distributions are also possible as long asthe charge in a cell varies smoothly as the cell is slowlyclaimed or vacated by the colloidal particle.
IV. VALIDATION
We implement our new algorithm using the waLBerlaframework68. It supports several lattice Boltzmann mod-els, including the one introduced in Section III A, andcorrectly handles the moving LB boundaries describedin Section III B. We already added an implementationof the EK model described in Section III C. waLBerlaprovides excellent scaling on high-performance computeclusters and contains advanced features, such as grid
6
T = 0
~v
T = 0.25
~v
T = 0.5
~v
T = 0.75
~v
T = 1
~v
T = 1.25
~v
Figure 1. Illustration of the mass conservation modificationto the Ladd boundary scheme to make it usable for EK. Cellswhose center is inside the particle are considered to be bound-ary nodes. The arrows indicate how solute is drawn intovacated cells (panes 2, 3, and 6) and expelled from newly-overlapped cells (panes 4 and 5).
during the time steps after a cell has been claimed orvacated. To reduce these effects, we propose a partialvolume scheme, which is illustrated in Fig. 2.
In the following, (r, t) is a field describing the volumefraction of the cell at r that is overlapped by a particle,with = 1 meaning that the cell is completely insidethe particle and = 0 completely outside. In the cal-culation of the diffusive fluxes (18), the concentrationsare replaced with ones that take into account that all so-lute resides in the non-overlapped part of the cells. Toprevent the resulting diffusive fluxes from diverging as ! 1, we renormalize them by scaling them with thevolume. This leads to the following modified expressionfor the flux:
jdiff
ki
(r ! r+ c
i
, t)
=
D
k
agrid
✓⇢k
(r, t)
1� (r, t) �⇢k
(r+ c
i
, t)
1� (r+ c
i
, t)
◆
� Dk
zk
e
2kB
Tagrid
(1 + 2p2)
✓⇢k
(r, t)
1� (r, t)
+⇢k
(r+ c
i
, t)
1� (r+ c
i
, t)
◆⇥ (�(r, t)� �(r+ c
i
, t))
�
⇥ (1� (r, t)) (1� (r+ c
i
, t)) . (23)
With this change, refilling vacated cells as per Eqs. (21)and (22) is no longer necessary. They can be set to zeroconcentration and will be filled up by the diffusive fluxagain as increases. We determine numerically bysub-dividing each cell into 8 equally-sized cells and de-termining how many of them are completely inside andcompletely outside the particle. For those cells that areneither, the subdivision is recursively repeated up to amaximum depth of 4. Expelling solute from a cell thatis claimed by a particle is, however, still necessary —even with the modified expression for the flux — as the
T = 0
~v
T = 0.1
~v
T = 0.2
~v
T = 0.3
~v
T = 0.4
~v
T = 0.5
~v
Overlapped volume : 0 1
Figure 2. Illustration of the partial volume scheme for mov-ing boundaries in EK. The shading of the cells inside theparticle corresponds to the overlapped volume to indicatehow the particle’s charge is distributed across the cell layerat its surface. In the calculation of the diffusive flux, the con-centrations are scaled with 1 � to determine the effectiveconcentrations.
cell is not necessarily completely empty by the time itis claimed. The expelled amount of solute with Eq. (23)is much smaller than with Eq. (18) and thus the effectof this sudden change on the simulation is reduced toacceptable levels.
One further source of sudden variations in solute fluxesis the change in electrostatic potential when the vol-ume across which a particle’s charge is distributed variesdue to the fluctuation in the number of boundary cells.Therefore, when calculating the electrostatic potential,each particle’s total charge Q = Ze is distributed amongall cells that are at least partially overlapped by thatparticle:
⇢b
(r, t) = Ze (r, t)
Vp
, (24)
with Vp
the particle’s (non-discrete) volume. Inhomo-geneous charge distributions are also possible as long asthe charge in a cell varies smoothly as the cell is slowlyclaimed or vacated by the colloidal particle.
IV. VALIDATION
We implement our new algorithm using the waLBerlaframework68. It supports several lattice Boltzmann mod-els, including the one introduced in Section III A, andcorrectly handles the moving LB boundaries describedin Section III B. We already added an implementationof the EK model described in Section III C. waLBerlaprovides excellent scaling on high-performance computeclusters and contains advanced features, such as grid
2017-10-10 26 / 27Institute for Computational PhysicsUniversity of Stuttgart
Grid refinement¢ All the interesting things happen in the Debye layer¢ We don’t want to waste computational effort on the bulk fluid¢ Use a lower resolution further away from boundaries or dynamically refine where the gradients