On the adaptive finite element analysis of the Kohn-Sham equations Denis Davydov, Toby Young, Paul Steinmann Denis Davydov, LTM, Erlangen, Germany August 2015
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 2 /29 Outline 1. Density Functional Theory and its discretisation with FEM 2. Mesh motion approach 3. A posteriori mesh refinement 4. Numerical examples and discussion 5. Conclusions and future work
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 3 /29 Different Scales time scale B @B n @B d deal.ii (a finite element Differential Equations Analysis Library) atomistic simulation quantum physics continuum mechanics Our goal is to solve quantum mechanics using h-fem. length scale Bangerth, W., Hartmann, R., & Kanschat, G. (2007). deal.ii---a general-purpose object-oriented finite element library. ACM Transactions on Mathematical Software, 33(4), 24 es. doi:10.1145/1268776.1268779
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 4 /29 Kohn-Sham theorem 1. The ground state property of many-electron system is uniquely determined by an electron density (x) x 2 R 3 2. There exists an energy functional of the system. In the ground state electron density minimises this functional. Born-Oppenheimer approximation: nuclei are fixed in space, electrons are moving in a static external potential generated by nuclei. O R J R I Electronic state is described by a wavefunction (x)
Density Functional Theory Total energy of the system E 0 = E kin + E Hartree + E ion + E xc + E zz The electron density: (x) := X f (x) 2 The kinetic energy of non-interacting electrons: E kin := X partial occupancy orthonormal electronic Z apple 1 f number, X such that wavefunctions 2 r2 dx f N e The exchange-correlation Z energy which represents quantum many-body interactions: E xc := (x)" xc ( (x)) dx The Hartree energy E Hartree := 1 Z (electrostatic Z interaction between electrons): (x) (x 0 ) 2 x x 0 dx 0 dx. Electrostatic interaction between electrons Z Z " and the external # potential of nuclei: X Z I E ion := V ion (x) (x)dx =: (x)dx x R I Repulsive nuclei-nuclei E zz := 1 X electrostatic interaction energy: Z I Z J 2 R I R J I,J6=I I Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 5 /29
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 6 /29 Kohn-Sham eigenvalue problem stationary conditions " # 1 2 r2 + V e (x; ) (x) = (x) V e (x) :=V ion (x)+v Hartree (x)+v xc (x) X I Z I x R I + Z (x 0 ) x x 0 dx0 + E xc Explicit Approach: compute Hartree potential more efficiently via solving the Poisson equation r 2 V Hartree (x) =4 (x) V ion need to evaluate for every quadrature point. Hence, bad scaling w.r.t. number of atoms. Implicit Approach: recall that 1/r is Green s functions of the Laplace operator " # X r 2 [V Hartree (x)+v ion (x)] = 4 (x) Z I (x R I ) solution is not in H 1! I
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 7 /29 Kohn-Sham eigenvalue problem (cont.) stationary conditions " # 1 2 r2 + V e (x; ) (x) = (x) V e (x) :=V S ion(x)+ V L ion(x)+v Hartree (x) + V xc (x) As a result evaluation of V ion scales linearly w.r.t. the number of atoms. Gaussian Approach: split Coulomb potential into fully-local short-range and smooth long-range parts Vion(x) L erf ( x R I / ) := Z I x R I X I This potential corresponds to the Gaussian charge distribution, i.e. r 2 Vion(x) L 4 X Z I x exp RI 2 3/2 3 2 I The remaining short-range part is used directly during assembly of the eigenvalue problem Vion(x) S Z I := V L 1 erf ( x R I / ) x R I ion(x) = Z I x R I X I X I whereas the Hartree potential and the long-range parts are evaluated by solving the Poisson problem r 2 V Hartree (x)+vion(x) L " X Z I x =4 (x) exp RI 2 # 3/2 3 2 I
Discretisation in space Introduce a finite (x) = X element basis for the wave-functions and the potential fields in i (x) '(x) = X i i ' i N ' i (x) (x) := X f (x) 2 The generalised eigenvalue problem [K ij + V ij ] j = M ij j solve iteratively until convergence i.e. split into a sequence of linear problems The generalised Poisson problem L ij ' j = R H j + R V j the potential Zmatrix V ij := N i (x)v e (x; ', )N j (x)dx contribution to the RHS from the electron density Z Rj H := 4 N ' i (x) (x)dx the mass (or overlap) matrix Z M ij := N i (x) N j (x)dx the kinetic matrix K ij := 1 Z 2 rn i (x) rn j (x)dx possibly non-zero contribution to the RHS from nuclei density - R V j the Laplace matrix Z L ij := rn ' i (x) rn ' j (x)dx Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 8 /29
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 9 /29 Outline 1. Density Functional Theory and its discretisation with FEM 2. Mesh motion approach 3. A posteriori mesh refinement 4. Numerical examples and discussion 5. Conclusions and future work
Mesh motion approach In order to increase the accuracy of numerical solution and avoid singularities of the Coulomb potential, we need to obtain a mesh such that ions are located at vertexes. O V I R I I u(v I ) - find the closest vertex - prescribe it s motion to nucleus position - move other nodes as to Hence we face a problem of determining the mesh motion field u(x) according to the specified point-wise constraints. Approach 1: Laplace equation [c(x)ru(x)] r = 0 on, u(x) =0 on @, such that u(v I )=R I V I, initial position of the vertex closest to nuclei I. c(x) = 1 min I x R I. Approach 1I: small-strain linear elasticity [c(x)c : r sym u(x)] r = 0 on, u(x) =0 on @, such that u(v I )=R I V I. fourth order isotropic elastic tensor with unit bulk and shear moduli. Jasak, H. & Tuković, Z (2006). Automatic Mesh Motion for the Unstructured Finite Volume Method Transactions of Famena, 30, 1-20. Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 10/29
Mesh motion (scaled Jacobian element quality) Naive displacement of the closest vertex to the position of nuclei lead to a unacceptably destroyed elements. Laplace approach was found to lead to a better element quality near nuclei. Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 11/29
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 12/29 Outline 1. Density Functional Theory and its discretisation with FEM 2. Mesh motion approach 3. A posteriori mesh refinement 4. Numerical examples and discussion 5. Conclusions and future work
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 13/29 A posteriori mesh refinement Approach 1: Residual based error-estimator for each eigenpair: Z apple 2 Z 1 e, 2 := h 2 e 2 r2 + V e dx + h e [r n] 2 da @ e e 2 e X 2 e, Approach 1I: Kelly error estimator applied to electron density or the electrostatic potential '. 2 e( ) :=h e Z@ e [[r( ) n] da Marking strategy: marks a minimum subset of a triangulation M T squared error is more than a given fraction of the squared total error " # X apple X e 2 e2t e2m 2 e whose
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 14/29 Outline 1. Density Functional Theory and its discretisation with FEM 2. Mesh motion approach 3. A posteriori mesh refinement 4. Numerical examples and discussion 5. Conclusions and future work
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 15/29 Treatment of the ionic potential Consider hydrogen atom centered at the origin. V e V ion H V ion (x) V L ion(x) The 1/r singularity can not be represented exactly by non-enhanced FE trial spaces. For the Gaussian charge approach a convergence to the analytical solution is evident.
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 16/29 Treatment of the ionic potential (cont.) Consider hydrogen and helium atoms that are centered at the origin. H He Each approach converges to the expected solution with subsequent mesh refinement. The split of the potential into fully local short-range and smooth long-range part is beneficial from the computational points of view. Otherwise scales badly w.r.t. the number of atoms.
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 17/29 Quadrature order For explicit treatment of ionic potential nonlinearities mainly come from the exchange-correlation potential and the Coulomb (1/r) potential. Consider helium and carbon atoms with different quadrature orders used to integrate Hamiltonian matrix and RHS of the Laplace problem. He C For both atoms energy convergence w.r.t. quadrature order is observed
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 18/29 Quadrature order (cont.) He C A posteriori refinement has a bigger influence on the resulting energy in comparison to the quadrature order used in calculations. Insufficient quadrature rule may result in energies lower than those obtained form the radial solution (i.e. violation of the variational principle).
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 19/29 Choice of the polynomial degree in FE spaces 1) which FE basis is the best (DoFs per element vs interpolation properties)? 2) can we use the same FE basis for Poisson and eigenvalue problem? O Linear FEs are too costly. The FE basis in the Poisson problem should be twice the polynomial degree of the eigenvalue problem in order to maintain variational character of the solution (the difference between energies becomes negative for 2/2 combination). The efficiency of the basis to reach the chemical accuracy (1e-3) depends on the problem.
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 20/29 Error estimators Consider neon (Ne) atom. Ne
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 21/29 Error estimators (cont.) Compare different error estimators: Ne Residual error estimator and Kelly estimator applied to eigenvectors result in a good convergence w.r.t. the expected total energy. The error estimator based on jumps in density (Kelly) does not lead to convergence. The Kelly estimator applied to the solution of the Poisson problem shows suboptimal convergence.
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 22/29 Towards optimisation of nucleus positions Consider a hydrogen molecule ion. Atoms are placed on the x axis symmetrically about the origin with varying interatomic distance. The same structured mesh is used as an input. H H
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 23/29 Towards optimisation of nucleus positions Consider carbon monoxide. Atoms are placed on the x axis symmetrically about the origin with varying interatomic distance. The same structured mesh is used as an input. O C a triple bond (+) :O C : ( ) 7 (x) 2
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 24/29 Outline 1. Density Functional Theory and its discretisation with FEM 2. Mesh motion approach 3. A posteriori mesh refinement 4. Numerical examples and discussion 5. Conclusions and future work
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 25/29 Summary Conclusions: Solution of the quantum many-body problem within the context of DFT using a realspace method based on h-adaptive FE discretisation of the space has been developed. - - - - - - Different treatments of the ionic potential produce adequate results given fine enough meshes and are well behaved with respect to refinement. The quadrature rule is not the most influential factor so long as it is accurate enough to integrate the mass matrix. In order to maintain variational nature of the solution, the polynomial degree of the Poisson FE basis should be twice of that used for the eigenvalue problem. The effectiveness of the polynomial degree in the FE basis depends on the problem considered. A residual-based error estimator or Kelly-error estimator applied to eigenvectors result in adequate convergence. Error estimators based on the density should be avoided. The proposed mesh motion approach to move vertices in such a way that each atom has an associated vertex at its position is well suited to be applied to the structural optimisation of molecules.
Denis Davydov, LTM, Erlangen, Germany College Station (August 2015) 26/29 Thank you for your attention References: Davydov, D.; Young, T. & Steinmann, P. (2015) On the adaptive finite element analysis of the Kohn-Sham equations: Methods, algorithms, and implementation. Journal for Numerical Methods in Engineering. Advanced Grant MOCOPOLY