1(*
2 Copyright (C) 2017 M.A.L. Marques
3
4 This Source Code Form is subject to the terms of the Mozilla Public
5 License, v. 2.0. If a copy of the MPL was not distributed with this
6 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7*)
8
9(* type: gga_exc *)
10
11$define lda_c_pw_params
12$include "lda_c_pw.mpl"
13
14pw91_C_c0  := 4.235e-3:
15pw91_alpha := 0.09:
16pw91_nu    := 16/Pi * (3*Pi^2)^(1/3):
17pw91_beta  := pw91_nu*pw91_C_c0:
18
19pw91_c1 := pw91_beta^2/(2*pw91_alpha):
20pw91_c2 := 2*pw91_alpha/pw91_beta:
21
22(* Equation (14) *)
23A := (rs, z) -> pw91_c2/(exp(-2*pw91_alpha*f_pw(rs, z)/(mphi(z)^3*pw91_beta^2)) - 1):
24
25(* Equation (13) *)
26H0 := (rs, z, t) -> pw91_c1*mphi(z)^3*log(1
27  + pw91_c2*(t^2 + A(rs, z)*t^4) / (1 + A(rs, z)*t^2 + A(rs, z)^2*t^4)
28):
29
30(* Pade parametrized form of C-xc found in
31   M Rasolt & DJW Geldart, Phys. Rev. B 34, 1325 (1986)
32*)
33RS_a := [2.568, 23.266, 0.007389]:
34RS_b := [1, 8.723, 0.472]:
35RG_C_xc := rs -> (RS_a[1] + RS_a[2]*rs + RS_a[3]*rs^2)/(1000*(RS_b[1] + RS_b[2]*rs + RS_b[3]*rs^2)):
36
37(* Equation (15) *)
38C_xc0 := 2.568e-3:
39C_x   := -0.001667:
40h_a1  := -100 * 4/Pi * (4/(9*Pi))^(1/3):
41
42H1 := (rs, z, t) -> pw91_nu * (RG_C_xc(rs) - C_xc0 - 3*C_x/7)
43 * mphi(z)^3*t^2*exp(h_a1*rs*mphi(z)^4*t^2):
44
45f_pw91 := (rs, z, xt, xs0, xs1) ->
46  f_pw(rs, z) + H0(rs, z, tt(rs, z, xt)) + H1(rs, z, tt(rs, z, xt)):
47f      := (rs, z, xt, xs0, xs1) -> f_pw91(rs, z, xt, xs0, xs1):
48