-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathreport_H_standard.py
executable file
·120 lines (91 loc) · 4 KB
/
report_H_standard.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#! /usr/bin/env python
################################################################################
# Copyright Adam J. Jackson (2014) #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
################################################################################
from materials import CZTS, Cu, Zn, Sn, alpha_S, Cu2S_low as Cu2S, SnS2, ZnS_zincblende as ZnS, SnS_pcma as SnS
T = 298.15 # K
P = 1E5 # Pa
DH_f_CZTS_eV = CZTS.H_eV(T,P) - (2.* Cu.H_eV(T,P) + Zn.H_eV(T,P)
+ Sn.H_eV(T,P) + 4.* alpha_S.H_eV(T,P))
DH_f_CZTS_kJ = CZTS.H_kJ(T,P) - (2.* Cu.H_kJ(T,P) + Zn.H_kJ(T,P)
+ Sn.H_kJ(T,P) + 4.* alpha_S.H_kJ(T,P))
DE_f_CZTS_eV = CZTS.pbesol_energy_eV/CZTS.fu_cell - (
2.*Cu.pbesol_energy_eV/Cu.fu_cell +
Zn.pbesol_energy_eV/Zn.fu_cell +
Sn.pbesol_energy_eV/Sn.fu_cell +
4.*alpha_S.pbesol_energy_eV/alpha_S.fu_cell
)
print ('Formation enthalpy of kesterite CZTS: ' +
'{0:3.2f} eV / formula unit'.format(DH_f_CZTS_eV)
)
print (' ' +
'{0:3.2f} kJ / mol'.format(DH_f_CZTS_kJ)
)
print ('Ground-state formation energy: ' +
'{0:3.2f} eV / formula unit'.format(DE_f_CZTS_eV)
)
print ('Standard enthalpy - ground-state energy: ' +
'{0:f} eV / formula unit'.format(DH_f_CZTS_eV-DE_f_CZTS_eV)
)
"""Binary phases"""
DH_f_Cu2S_eV = Cu2S.H_eV(T,P) - (
2.*Cu.H_eV(T,P) + alpha_S.H_eV(T,P)
)
DH_f_Cu2S_kJ = Cu2S.H_kJ(T,P) - (
2.*Cu.H_kJ(T,P) + alpha_S.H_kJ(T,P)
)
DH_f_SnS_eV = SnS.H_eV(T,P) - (
Sn.H_eV(T,P) + alpha_S.H_eV(T,P)
)
DH_f_SnS_kJ = SnS.H_kJ(T,P) - (
Sn.H_kJ(T,P) + alpha_S.H_kJ(T,P)
)
DH_f_SnS2_eV = SnS2.H_eV(T,P) - (
Sn.H_eV(T,P) + 2.*alpha_S.H_eV(T,P)
)
DH_f_SnS2_kJ = SnS2.H_kJ(T,P) - (
Sn.H_kJ(T,P) + 2.*alpha_S.H_kJ(T,P)
)
DH_f_ZnS_eV = ZnS.H_eV(T,P) - (
Zn.H_eV(T,P) + alpha_S.H_eV(T,P)
)
DH_f_ZnS_kJ = ZnS.H_kJ(T,P) - (
Zn.H_kJ(T,P) + alpha_S.H_kJ(T,P)
)
print ('Formation enthalpy of low Cu2S: ' +
'{0:3.2f} eV / formula unit'.format(DH_f_Cu2S_eV)
)
print (' ' +
'{0:3.2f} kJ / mol'.format(DH_f_Cu2S_kJ)
)
print ('Formation enthalpy of SnS: ' +
'{0:3.2f} eV / formula unit'.format(DH_f_SnS_eV)
)
print (' ' +
'{0:3.2f} kJ / mol'.format(DH_f_SnS_kJ)
)
print ('Formation enthalpy of SnS2: ' +
'{0:3.2f} eV / formula unit'.format(DH_f_SnS2_eV)
)
print (' ' +
'{0:3.2f} kJ / mol'.format(DH_f_SnS2_kJ)
)
print ('Formation enthalpy of zinc blende: ' +
'{0:3.2f} eV / formula unit'.format(DH_f_ZnS_eV)
)
print (' ' +
'{0:3.2f} kJ / mol'.format(DH_f_ZnS_kJ)
)