HAL Id: hal-01897053
https://hal.sorbonne-universite.fr/hal-01897053
Submitted on 16 Oct 2018
HAL
is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire
HAL, estdestinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Second-order lattice Fokker-Planck algorithm from the trapezoidal rule
Benjamin Rotenberg, Daniele Moroni
To cite this version:
Benjamin Rotenberg, Daniele Moroni. Second-order lattice Fokker-Planck algorithm from the trape-
zoidal rule. Physical Review E : Statistical, Nonlinear, and Soft Matter Physics, American Physical
Society, 2006, 74 (3), pp.037701. �10.1103/PhysRevE.74.037701�. �hal-01897053�
Second-order lattice Fokker-Planck algorithm from the trapezoidal rule
Benjamin Rotenberg1,2and Daniele Moroni3
1Université Pierre et Marie Curie-Paris6, Laboratoire Liquides Ioniques et Interfaces Chargées, UMR CNRS 7612, 4 pl. Jussieu, Paris F- 75005
2ANDRA, Parc de la Croix Blanche, 1/7 rue Jean Monnet 92298 Châtenay Malabry, cedex F-75005, France
3Department of Chemistry, University of Cambridge, Lensfield Road, Cambridge CB2 1EW, United Kingdom 共Received 26 April 2006; published 5 September 2006兲
The well-established procedure of deriving lattice Boltzmann schemes using the trapezoidal rule for time integration is generalized to the recently introduced lattice Fokker-Planck method.
DOI:10.1103/PhysRevE.74.037701 PACS number共s兲: 47.11.⫺j, 47.10.⫺g, 05.20.Dd In a series of recent papers关1–4兴a lattice method to solve
the Fokker-Planck共FP兲kinetic equation has been introduced.
The equation models a two-component system, e.g., solute and solvent, when a separation of time scales is expected.
One can then adopt an effective one-component description and consider only the solute distribution function while the FP collision operator takes into account the effect of the solvent. The resulting kinetic equation can be solved numeri- cally within the framework of the Lattice-Boltzmann 共LB兲 method关5–8兴. The method is usually applied to kinetic equa- tions of the Bhatnagar-Gross-Krook 共BGK兲 type to repro- duce hydrodynamic behavior, but can also be used to con- struct lattice algorithms to solve more general types of equations关5兴.
The derivation of the lattice FP 共LFP兲 algorithm, de- scribed in detail in 关1兴, follows a systematic procedure 关9–12兴 involving two separate steps: discretization in real and velocity space on the one hand, discretization in time on the other hand. In the first step the positionsxare considered points on a lattice, and the velocities can only assume a finite set of valuesvi,i= 1 , . . . ,bcorresponding to lattice links. The resulting continuous-time equation for the lattice distribution functionsgiis
tgi共x;t兲+vi␣␣gi共x;t兲=Lˆi关g共x;t兲兴, 共1兲 wherevi␣are Cartesian components in generic dimensionD, Greek indices run from 1 toD, t=/t and ␣=/x␣ are, respectively, time and space derivatives, and summation con- vention is assumed. On the right-hand side appears the ith componentLˆiof the lattice collision operatorLˆacting on the populationsgi共x;t兲denoted by the collective symbolg. The lattice operator is derived from the continuous FP operator using a Gauss-Hermite quadrature and involves the moments of thegi in velocity space, namely the density=兺igi, the current J␣=兺igivi␣, and the stress tensor P␣=兺igivi␣vi. The second step is achieved by integrating 共1兲 between t and t+⌬t. Let g共s兲 denote the time-shifted populations gi共x+vis;t+s兲. Then
g⬘−g=
冕
0⌬t
Lˆ关g共s兲兴ds, 共2兲
whereg⬘=g共⌬t兲 are the populations gi共x+vi⌬t;t+⌬t兲. Ap- proximation of the integral by the rectangle rule results in a
numerical scheme which is only first-order accurate in ⌬t.
In 关1兴 the Chapman-Enskog analysis of the algorithm al- lowed us to evaluate theO共⌬t2兲corrections analytically, so that it was possible to derive a heuristic second-order scheme, referred to as “corrected scheme.” In this paper, we show that it is possible to achieve second-order accuracy of the LFP scheme by extending an idea commonly used in LB methods, the approximation of the integral in共2兲by the trapezoidal rule关13–16兴.
The trapezoidal rule is an average of the starting and final points of the integration interval
冕
0⌬t
Lˆ关g共s兲兴ds=⌬t
2共Lˆ关g⬘兴+Lˆ关g兴兲+O共⌬t3兲 共3兲 It is similar in spirit to the Crank-Nicholson method for or- dinary differential equations and has second-order accuracy 关17兴. The presence of the collision operator at time t+⌬t makes the combination of 共2兲 and 共3兲 unusable as such.
However, following关13–16兴we introduce the mapping
˜g=g−⌬t
2 Lˆ关g兴 共4兲
and rewrite共3兲as g
˜⬘−˜g=⌬tLˆ关g兴+O共⌬t3兲, 共5兲 where the right-hand side now depends on the populationsgi
at timetonly. Equation共5兲can be turned into an operational form by expressing the collision operator in terms of the shifted populations共4兲.
It is instructive to recall the final form of the scheme in the case of the BGK collision operator
LˆBGK关g兴= −−1共g−geq兲⬟−−1LBGK关g兴, 共6兲 where −1 is the collision frequency, geq is the discretized Maxwell-Boltzmann equilibrium population, depending only on the moments ,J, and we have introduced the operator LBGK关g兴=g−geq. Using the definition共4兲, Eq.共5兲is rewritten as
g
˜⬘−g˜= − −1⌬t
1 +−1⌬t/2LBGK关g˜兴 共7兲 and, in particular, we can compute˜geqbecause the zeroth and first moments ofg and˜g coincide. This is not true for the
second moment tensorP, and indeed the trapezoidally evolv- ing distributionsgmust be used for the sampling. In practice one does not invert共4兲 共which is not trivial兲but just uses the associated moment relations.
In the LFP case−1is replaced by the friction␥andLBGK by关1兴
Li关g兴/wi=关J␣−J␣eq兴Hi,␣共1兲
vT2 + 2关P␣−P␣eq兴Hi,␣共2兲
2vT4 , 共8兲 where the Hermite polynomials 关18兴 are Hi,␣共1兲=vi␣, Hi,␣共2兲
=vi␣vi−vT2␦␣,wiare appropriate weights,vTis the thermal velocity,
J␣eq⬟u␣E 共9兲
P␣eq ⬟vT2␦␣+共u␣EJ+uEJ␣兲/2 共10兲 and the external velocityu␣Eis defined such that the constant external fieldm␥u␣E acts on the solute particles of mass m.
The collision operator involves now up to the second mo- ment, and computing the moments on both sides of共4兲we get
˜=, 共11a兲
˜J
␣=
冉
1 +␥2⌬t冊
J␣−␥2⌬tJ␣eq, 共11b兲P˜
␣=共1 +␥⌬t兲P␣−␥⌬tP␣eq, 共11c兲 showing that only the zeroth moments ofg and˜g coincide.
The operational form of the trapezoidal LFP algorithm is specified by
˜g⬘−˜g= −␥⌬tL˜关g˜兴, 共12兲 where the operator L˜关g˜兴 must satisfy ˜L关g˜兴⬅L关g兴. In the BGK caseL˜关g˜兴is justL关g˜兴/共1 +−1⌬t/ 2兲, see Eq.共7兲. In the LFP case instead we have to invert Eqs.共11兲. The collision operator L˜ can be computed explicitly, but in a computer implementation one can follow a recursive procedure. The zeroth moments coincide, and the first becomes
J␣=˜J␣+共␥⌬t/2兲J␣eq
1 +␥⌬t/2 , 共13a兲 where J␣eq can be computed because it contains only =˜. The second moment is then
P␣= P˜
␣+␥⌬tP␣eq
1 +␥⌬t 共13b兲
and againP␣eq contains only andJ␣ which are now avail- able. Substituting relations 共13a兲 and共13b兲into 共8兲 we get the desired operator
L˜
i关g˜兴/wi= ˜J
␣−J␣eq 1 +␥⌬t/2
Hi,␣共1兲 vT2 + 2P˜
␣−P␣eq 1 +␥⌬t
Hi,␣共2兲
2vT4 . 共14兲 Equations共11兲are specific to the FP case, but the recursive procedure only exploits the fact that the collision matrix is lower triangular关1兴and has hence wider applicability.
The trapezoidal algorithm can be summarized as follows.
Choose the friction␥, which at variance with the scheme of Ref. 关1兴 does not need any rescaling. The evolution is per- formed on˜g, while initial conditions and sampling use the trapezoidally corrected bare moments,J,P, which are the true hydrodynamic variables. Then given g˜ at time t: 共1兲 Compute the tilde moments ˜,J˜␣,P˜␣ and hence the bare equilibrium momentsJ␣eq,P␣eq using the recursive procedure;
共2兲 Compute the post-collision populations˜L关g˜兴 using 共14兲;
共3兲Stream˜gto˜g⬘at timet+⌬t. The hydrodynamic variables are sampled by means of Eqs.共13a兲and共13b兲. The compu- tational effort is comparable to that of previously proposed schemes because the new collision operator just requires the inversion equations 共13a兲 and 共13b兲 which only involve a few more floating point operations. In particular, the linear scaling with lattice size is preserved.
It can be shown that the heuristic scheme introduced in 关1兴 can be recovered by 共a兲 using the tilde variables in place of the bare ones关also in the definition of the equi- librium moments 共9兲 and 共10兲兴 and an effective friction
␥
˜=␥/共1 +␥⌬t/ 2兲,共b兲neglecting aO共⌬t2兲term in the lattice collision operator 共14兲, and 共c兲 expanding to order ⌬t Eqs.
共13a兲 and 共13b兲 for the sampled moments 共which were de- noted with stars in 关1兴兲. This explains why the heuristic scheme has a larger error of order ⌬t2 than the trapezoidal algorithm共see below兲, and also shows that the evolution of the density and the current are identical in both schemes.
The present algorithm propagates the populations fromt tot+⌬twith second-order accuracy. However, the error after many time steps could be worse. We now show that this order of accuracy is preserved for the long-time behavior by performing a Chapman-Enskog analysis. The populationsgi
and the time and space derivatives are expanded in powers of a small parameter⑀analogous to the Knudsen number used in the LB case:
gi=gi共0兲+⑀gi共1兲+⑀2gi共2兲 共15a兲
t=⑀t共1兲+⑀2t共2兲, ␣=⑀␣共1兲. 共15b兲
In the FP case however, the relevant expansion parameter is rather defined as⑀=共vT/R兲/␥, whereR is the solute radius.
The small⑀expansion is thus a high friction limit, where a large number of solute-solvent collisions occur while the sol- ute moves over its own radius 关19兴. All hydrodynamic mo- ments, which are linear combinations of the gi’s, are ex- panded as in Eq.共15a兲. We can approximate the populations
˜gi⬘⬅˜gi共x+vi⌬t;t+⌬t兲 by a Taylor expansion around ˜gi
⬅˜gi共x;t兲, and write up to second order ˜gi⬘−˜gi=⌬tCˆ
S关˜gi兴, where
BRIEF REPORTS PHYSICAL REVIEW E74, 037701共2006兲
037701-2
Cˆ
S关g˜i兴=关t+vi␣␣+⌬t共t+vi␣␣兲2/2兴g˜i. 共16兲 Using Eqs.共15兲the operator Cˆ
Sis expanded as
CˆS关g˜i兴=⑀兵t共1兲˜gi共0兲+␣共1兲vi␣˜gi共0兲其+⑀2兵t共1兲˜gi共1兲+␣共1兲vi␣˜gi共1兲 +t共2兲˜gi共0兲+关t共1兲共t共1兲˜gi共0兲+共1兲vi˜gi共0兲兲
+␣共1兲共t共1兲vi␣˜gi共0兲+共1兲vi␣vi˜gi共0兲兲兴⌬t/2其. 共17兲 As for the lattice collision operator 共8兲, the expansion acts order by order on the moments and we can write Li关g兴=Li共0兲+⑀Li
共1兲+⑀2Li
共2兲 where
Li共兲/wi=关J␣共兲−J␣eq,共兲兴Hi,␣共1兲
vT2 + 2关P␣共兲−P␣eq,共兲兴Hi,␣共2兲 2vT4
共18兲 for= 0 , 1 , 2. After equating terms of the same order in⑀in Eqs.共17兲and共18兲, the moment equations can be computed at each order. For the zeroth moment equation one can just sum both sides of the equations overi, for the next moments one must first multiply byvi␥, vi␥vi␦, and so on. For each order in⑀, we can compute different moment equations. The computations are carried out using the orthonormality rela- tions of Hermite polynomials, see, e.g., 关1,18兴. To order 0, the zeroth moment does not give any information, while the first and second moment read
0 = −␥关J␥共0兲−J␥eq,共0兲兴, 共19a兲
0 = − 2␥关P␥共0␦兲−P␥eq,␦共0兲兴. 共19b兲 At this stage it is important to note that using共19兲and共11兲 one also finds
˜共兲=共兲", ˜J␥共0兲=J␥共0兲, P˜␥共0兲␦=P␥共0兲␦. 共20兲
To order⑀we find for the zeroth, first, and second moments
t共1兲˜共0兲+␣共1兲˜J␣共0兲= 0, 共21a兲
t共1兲˜J
␥共0兲+␣共1兲P˜␣␥共0兲= −␥关J␥共1兲−J␥eq,共1兲兴, 共21b兲
t共1兲P˜
␥␦
共0兲+␣共1兲Q˜␣␥共0兲␦= − 2␥关P␥共1兲␦−P␥eq,共1兲␦ 兴. 共21c兲 For the order⑀2we use the results of Eq.共21兲, and we only consider the zeroth and first moment equations. Using Eqs.
共21兲and共11兲we get after some algebra
t共2兲共0兲+t共1兲共1兲+␣共1兲J␣共1兲= 0, 共22a兲
t共2兲J␥共0兲+t共1兲J␥共1兲+␣共1兲P␣␥共1兲= −␥关J␥共2兲−J␥eq,共2兲兴. 共22b兲 We now reconstruct the total time and space derivative by forming the combinations ⑀1共21a兲+⑀2共22a兲 for the zeroth moment, and ⑀0共19a兲+⑀1共21b兲+⑀2共22b兲 for the first, where in共21a兲and共21b兲the moments can be replaced by their bare counterparts, according to共20兲. Recognizing that␣X=⑀␣共1兲
⫻共X共0兲+⑀X共1兲兲=⑀␣共1兲X共0兲+⑀2␣共1兲X共1兲, where X is any of the moments, and that tX=⑀t
共1兲X共0兲+⑀2t
共2兲X共0兲+⑀2t
共1兲X共1兲, the combinations can be written as
t+␣J␣= 0, 共23a兲
tJ␥+␣P␣␥= −␥共J␥−J␥eq兲, 共23b兲 which coincide with the moment equations obtained from the continuous FP equation关1兴.
Stability analysis of LB schemes requires −2⬍⬍0, where is any eigenvalue of the associated collision matrix 关6兴. In the present trapezoidal LFP case the eigenvalues FIG. 1. Relative error on the stressPas a function of time for a
constant, uniform applied field on an infinite homogeneous system at a friction␥⌬t= 0.9. The trapezoidal scheme共solid line兲and the corrected scheme of Ref.关1兴 共dashed lined兲, are compared to the analytical solution Eq.共24兲. The trapezoidal algorithm shows better agreement with theory.
FIG. 2. Relative error for the diffusion coefficient. In the trap- ezoidal scheme the error is almost equal to −关a⌬t/共2vT兲兴2 共solid line兲, independently of the friction␥, while the error is larger in the corrected scheme共symbols兲and does depend on the friction. Accel- erationais in units⌬x/⌬t2.
can be computed along the lines of关1兴 and are 0,−␥⌬t/共1 +␥⌬t/ 2兲, and −2␥⌬t/共1 +␥⌬t兲. The stability inequalities are always satisfied and the scheme is unconditionally stable.
This is an interesting effect that we also verified numerically.
We note that this does not also mean that the scheme uncon- ditionally reproduces Eqs. 共23兲. The numerical criterions of small Mach number 共weak external fields兲 and friction 共␥⌬t⬍1兲 found in 关1兴 continue to apply for a faithful reproduction of the macroscopic equations.
We now reconsider two numerical tests introduced in关1兴.
In the first example, a constant external fieldm␥uEis applied in a one-dimensional system with periodic boundary conditions, initially homogeneous at density 0 and vanish- ing velocity. The current obeys J共t兲=uE关1 − exp共−␥t兲兴 and the evolution equation for the second moment
tP= −2␥共P−vT2−uEJ兲has the analytical solution P共t兲=关共uE兲2+vT2兴− 2共uE兲2e−␥t
+兵P共0兲− 2关−共uE兲2+vT2兴其e−2␥t 共24兲 The system is initialized with a Maxwell-Boltzmann distri- bution at fixed macroscopic=0,J/⬅u= 0. The simulated moments˜,u˜=˜J/˜ are set to fulfill these conditions, and in this case both the corrected and the trapezoidal scheme re- duce to setting˜=0and˜u= −uE␥⌬t/ 2. The quantity˜P共0兲is completely determined and equal to共vT
2+˜u2兲 which in turn gives P共0兲=vT2+˜u2/共1 +␥⌬t兲 for the trapezoidal scheme andP共0兲=vT
2−˜u2for the corrected scheme关in the continu- ous caseP共0兲=vT
2兴. Simulation results show that the current Jis exactly the same in both schemes and fails to correctly reproduce the continuous results for␥⌬t⬎1, but the stress tensorP is closer to the analytical result in the trapezoidal scheme共see Fig.1兲.
In the second example we consider the same system with bounce-back no-slip reflecting boundary conditions关5兴. Let a=␥uE denote the constant applied acceleration. Accumula-
tion due to migration results in a concentration gradient which is the source of a diffusive flux opposed to the applied field. From the balance of fluxes, we find at equilibrium the barometric law for the density eq共x兲⬀exp共ax/vT2兲
⬅exp共uEx/D0兲, where we defined the diffusion coefficient D0=vT2/␥according to Einstein’s relation. From an exponen- tial fit of the data we derive a simulated diffusion coefficient Dsimupon dividing uE by the measured slope. The relative error reported in Fig. 2 shows that the values of Dsim are closer toD0than in the case of the corrected scheme. In the former case the error is almost equal to −关a⌬t/共2vT兲兴2, inde- pendently of the friction ␥, and smaller than in the latter case, where in addition the error depends on the friction.
We have presented a new lattice Fokker-Planck algorithm, based on the trapezoidal rule for time integration. Generaliz- ing a well-established procedure of LB methods we have derived a computational scheme for the integration of the LFP equation with second-order accuracy. The Chapman- Enskog analysis and numerical tests of this scheme confirm the increased accuracy with respect to the integration schemes of Refs.关1–3兴, where LFP was introduced. We thus recommend the use of the trapezoidal algorithm in the imple- mentations of the LFP method. Further improvements are expected by using refined no-slip boundary conditions关20兴.
A LB scheme in the presence of nonconserved fields has recently been derived in 关21兴. Work is in progress on the generalization of the present method to cases where the external field is self-consistent or time dependent.
ACKNOWLEDGMENTS
Fruitful discussions with J.-P. Hansen, S. Melchionna, and S. Succi are gratefully acknowledged. B.R. acknowl- edges financial support from the Agence Nationale pour la Gestion des Déchets Radioactifs 共ANDRA, France兲.
D.M. acknowledges financial support from Schlumberger Cambridge Research.
关1兴D. Moroni, B. Rotenberg, J.-P. Hansen, S. Succi, and S. Mel- chionna, Phys. Rev. E 73, 066707共2006兲.
关2兴S. Melchionna, S. Succi, and J.-P. Hansen, Int. J. Mod. Phys. C 17, 459共2006兲.
关3兴S. Melchionna, S. Succi, and J.-P. Hansen, Phys. Rev. E 73, 017701共2006兲.
关4兴B. Rotenberget al., J. Chem. Phys. 124, 154701共2006兲. 关5兴S. Succi,The Lattice Boltzmann Equation for Fluid Dynamics
and Beyond共Oxford University Press, Oxford, 2001兲. 关6兴R. Benzi, S. Succi, and M. Vergassola, Phys. Rep. 222, 145
共1992兲.
关7兴S. Chen and G. Doolen, Annu. Rev. Fluid Mech. 30, 329 共1998兲.
关8兴S. Succi, I. V. Karlin, and H. Chen, Rev. Mod. Phys. 74, 1203 共2002兲.
关9兴X. He and L.-S. Luo, Phys. Rev. E 55, R6333共1997兲. 关10兴X. He and L.-S. Luo, Phys. Rev. E 56, 6811共1997兲. 关11兴X. Shan and X. He, Phys. Rev. Lett. 80, 65共1998兲.
关12兴N. S. Martys, X. Shan, and H. Chen, Phys. Rev. E 58, 6855 共1998兲.
关13兴X. He, X. Shan, and G. D. Doolen, Phys. Rev. E 57, R13 共1998兲.
关14兴X. He, S. Chen, and G. D. Doolen, J. Comput. Phys. 146, 282 共1998兲.
关15兴P. J. Dellar, Phys. Rev. E 64, 031203共2001兲. 关16兴P. J. Dellar, J. Comput. Phys. 190, 351共2003兲.
关17兴M. Abramowitz and I. A. Stegun,Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing共Dover, New York, 1972兲.
关18兴H. Grad, Commun. Pure Appl. Math. 2, 325共1949兲. 关19兴L. Bocquet, Am. J. Phys. 65, 140共1997兲.
关20兴M. Rohde, D. Kandhai, J. J. Derksen, and H. E. A. Van den Akker, Phys. Rev. E 67, 066703共2003兲.
关21兴S. Arcidiacono et al., Math. Comput. Simul. 72 共2–6兲, 79 共2006兲.
BRIEF REPORTS PHYSICAL REVIEW E74, 037701共2006兲
037701-4