def main(): from materials import CZTS, Cu, Zn, Sn, S8 import numpy as np T = np.linspace(100,1500,100) # K P = np.array( np.logspace(1,7,100),ndmin=2).transpose() # Pa D_mu = CZTS.mu_kJ(T,P) - (2*Cu.mu_kJ(T,P) + Zn.mu_kJ(T,P) + Sn.mu_kJ(T,P) + 0.5*S8.mu_kJ(T,P) ) D_mu_label = '$\Delta G_f$ / kJ mol$^{-1}$' scale_range = [-380,-240] plot_potential(T,P,D_mu,D_mu_label,scale_range, filename='plots/DG_CZTS_S8.png')
def main(): from materials import CZTS, Cu2S_low, ZnS_zincblende, Sn, S2 import numpy as np from DG_CZTS_S8 import plot_potential T = np.linspace(100,1500,100) # K P = np.array( np.logspace(1,7,100),ndmin=2).transpose() # Pa D_mu = CZTS.mu_kJ(T,P) - (Cu2S_low.mu_kJ(T,P) + ZnS_zincblende.mu_kJ(T,P) + Sn.mu_kJ(T,P) + S2.mu_kJ(T,P) ) D_mu_label = '$\Delta G_f$ / kJ mol$^{-1}$' scale_range = [-300,100] plot_potential(T,P,D_mu,D_mu_label,scale_range, filename='plots/DG_CZTS_SnS2.png')
# 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: ' +