예제 #1
0
 def U_eV(self,T):
     """Internal energy of one formula unit of ideal gas, expressed in eV.
     U = ideal_gas.U_eV(T)
     Returns a matrix with the same dimensions as T
     """
     U_func = get_potential_nist_table(self.thermo_file,'U')
     return (self.pbesol_energy_eV + self.zpe +
             U_func(T)*constants.physical_constants['joule-electron volt relationship'][0]/constants.N_A
             )
예제 #2
0
 def U_eV(self, T):
     """Internal energy of one formula unit of ideal gas, expressed in eV.
     U = ideal_gas.U_eV(T)
     Returns a matrix with the same dimensions as T
     """
     U_func = get_potential_nist_table(self.thermo_file, 'U')
     return (
         self.pbesol_energy_eV + self.zpe + U_func(T) *
         constants.physical_constants['joule-electron volt relationship'][0]
         / constants.N_A)
예제 #3
0
    def H_eV(self,T,*P):
        """Enthalpy of one formula unit of ideal gas, expressed in eV
        H = ideal_gas.H_eV(T)
        Returns an array with the same dimensions as T

        Accepts ideal_gas.H_eV(T,P): P is unused
        """
        H_func = get_potential_nist_table(self.thermo_file,'H')
        return (self.pbesol_energy_eV + self.zpe +
                H_func(T)*constants.physical_constants['joule-electron volt relationship'][0]/constants.N_A
                )
예제 #4
0
    def H_eV(self, T, *P):
        """Enthalpy of one formula unit of ideal gas, expressed in eV
        H = ideal_gas.H_eV(T)
        Returns an array with the same dimensions as T

        Accepts ideal_gas.H_eV(T,P): P is unused
        """
        H_func = get_potential_nist_table(self.thermo_file, 'H')
        return (
            self.pbesol_energy_eV + self.zpe + H_func(T) *
            constants.physical_constants['joule-electron volt relationship'][0]
            / constants.N_A)
예제 #5
0
    def mu_eV(self,T,P):
        """
        Free energy of one formula unit of ideal gas, expressed in eV
        mu = ideal_gas.mu_eV(T,P)
        T, P may be orthogonal 2D arrays of length m and n, populated in one row/column:
        in this case H is an m x n matrix.

        T, P may instead be equal-length non-orthogonal 1D arrays, in which case H is a vector
        of H values corresponding to T,P pairs.

        Other T, P arrays may result in undefined behaviour.
        """
        S_func = get_potential_nist_table(self.thermo_file,'S')
        S = S_func(T) * constants.physical_constants['joule-electron volt relationship'][0]/constants.N_A
        H = self.H_eV(T)
        return H - T*S + constants.physical_constants['Boltzmann constant in eV/K'][0] * T * np.log(P/1E5)
예제 #6
0
    def mu_eV(self, T, P):
        """
        Free energy of one formula unit of ideal gas, expressed in eV
        mu = ideal_gas.mu_eV(T,P)
        T, P may be orthogonal 2D arrays of length m and n, populated in one row/column:
        in this case H is an m x n matrix.

        T, P may instead be equal-length non-orthogonal 1D arrays, in which case H is a vector
        of H values corresponding to T,P pairs.

        Other T, P arrays may result in undefined behaviour.
        """
        S_func = get_potential_nist_table(self.thermo_file, 'S')
        S = S_func(T) * constants.physical_constants[
            'joule-electron volt relationship'][0] / constants.N_A
        H = self.H_eV(T)
        return H - T * S + constants.physical_constants[
            'Boltzmann constant in eV/K'][0] * T * np.log(P / 1E5)