コード例 #1
0
def main():
    from materials import CZTS, Cu2S_low, ZnS_zincblende, SnS, S2
    import numpy as np

    # Surface model from ab initio calcs and NIST data

    T = np.linspace(573.15, 873.15, 100)  # K
    P = np.array(np.logspace(-8, 2, 100), ndmin=2).transpose()  # Pa

    D_mu = CZTS.mu_kJ(T, P) - (Cu2S_low.mu_kJ(T, P) + ZnS_zincblende.mu_kJ(
        T, P) + SnS.mu_kJ(T, P) + 0.5 * S2.mu_kJ(T, P))

    D_mu_label = '$\Delta G_f$ / kJ mol$^{-1}$'
    scale_range = [-50, 70]

    # Stability lines from figure 5, J. J. Scragg et al., Chem. Mater. (2011) 23 4625-4633
    kinetic_data = np.genfromtxt('jscragg_2011.csv',
                                 delimiter=',',
                                 skip_header=1)
    # Convert log pressure to absolute pressure in mbar
    kinetic_data[:, 1:] = np.power(10, kinetic_data[:, 1:])
    # Columnwise conversion to SI units from deg C and mbar
    kinetic_data_si = (kinetic_data + [273.15, 0., 0.]) * [1., 100., 100.]

    plot_potential(T,
                   P,
                   D_mu,
                   D_mu_label,
                   scale_range,
                   filename='plots/DG_CZTS_SnS_Scragg.png',
                   T_units='K',
                   P_units='Pa',
                   overlay=kinetic_data_si)
コード例 #2
0
def main():
    from materials import CZTS, Cu2S_low, ZnS_zincblende, SnS, S2
    import numpy as np

    # Surface model from ab initio calcs and NIST data

    T = np.linspace(573.15,873.15,100)    # K
    P = np.array( np.logspace(-8,2,100),ndmin=2).transpose() # Pa
    
    D_mu = CZTS.mu_kJ(T,P) - (Cu2S_low.mu_kJ(T,P) +
                              ZnS_zincblende.mu_kJ(T,P) +
                              SnS.mu_kJ(T,P) +
                              0.5*S2.mu_kJ(T,P) )
    
    D_mu_label = '$\Delta G_f$ / kJ mol$^{-1}$'
    scale_range = [-50,70]

    # Stability lines from figure 5, J. J. Scragg et al., Chem. Mater. (2011) 23 4625-4633
    kinetic_data = np.genfromtxt('jscragg_2011.csv',delimiter=',',skip_header=1)
    # Convert log pressure to absolute pressure in mbar
    kinetic_data[:,1:] = np.power(10,kinetic_data[:,1:])
    # Columnwise conversion to SI units from deg C and mbar
    kinetic_data_si = (kinetic_data + [273.15, 0., 0.]) * [1., 100., 100.]
    
    plot_potential(T,P,D_mu,D_mu_label,scale_range, filename='plots/DG_CZTS_SnS_Scragg.png',
                   T_units='K', P_units='Pa', overlay=kinetic_data_si)
コード例 #3
0
ファイル: DG_CZTS_S8.py プロジェクト: ljzhou86/CZTS-model
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')
コード例 #4
0
def main():
    from materials import CZTS, Cu2S_low, ZnS_zincblende, SnS2
    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) +
                              SnS2.mu_kJ(T,P)
                                      )
    
    D_mu_label = '$\Delta G_f$ / kJ mol$^{-1}$'
    scale_range = [-50,-40]
    
    plot_potential(T,P,D_mu,D_mu_label,scale_range, filename='plots/DG_CZTS_binaries.png', precision="%.1f")
コード例 #5
0
#                                                                              #
#   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))