Example #1
0
    def gibbs_free_energy(self,pressure,temperature, volume, params):
        """
        Returns the gibbs free energy [J/mol] as a function of pressure [Pa]
        and temperature [K].
        """
        # Calculate temperature and pressure integrals
        a, b, c = mt.tait_constants(params)
        Pth=self.__relative_thermal_pressure(temperature,params)

        psubpth=pressure-Pth

        # EQ 13
        intVdP = pressure*params['V_0']*(1. - a + (a*(np.power((1.-b*Pth), 1.-c) - np.power((1. + b*(pressure-Pth)), 1.-c))/(b*(c-1.)*pressure)))

        # Add order-disorder terms if required
        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
            Gdisord=gibbs_disorder_Landau(pressure, temperature, params)
        else:
            if params.has_key('BW_deltaH'): # Add Bragg-Williams disordering
                Gdisord=gibbs_disorder_BW(pressure, temperature, params) - gibbs_disorder_BW(P_0, T_0, params)
            else:
                Gdisord=0.0

        if params.has_key('magnetic_moment'):
            Gmagnetic=self._magnetic_gibbs(pressure, temperature, params)
        else:
            Gmagnetic=0.0

        return params['H_0'] + self.__intCpdT(temperature, params) - temperature*(params['S_0'] + self.__intCpoverTdT(temperature, params)) + intVdP + Gdisord + Gmagnetic
Example #2
0
    def thermal_expansivity(self, pressure, temperature, volume , params):
        """
        Returns thermal expansivity at the pressure, temperature, and volume [1/K]
        Replace -Pth in EQ 13+1 with P-Pth for non-ambient temperature 
        """
        a, b, c = mt.tait_constants(params)
        Pth=self.__relative_thermal_pressure(temperature,params)
        psubpth=pressure-Pth
        einstein_T=self.__einstein_temperature(params['S_0'], params['n'])
        C_V0 = einstein.heat_capacity_v( T_0, einstein_T, params['n'] )
        C_V =  einstein.heat_capacity_v(temperature, einstein_T,params['n'])
        alpha = params['a_0'] * (C_V/C_V0) *1./((1.+b*psubpth)*(a + (1.-a)*np.power((1+b*psubpth), c)))
 
        return alpha
Example #3
0
    def heat_capacity_p(self, pressure, temperature, volume, params):
        """
        Returns the heat capacity [J/K/mol] as a function of pressure [Pa]
        and temperature [K].
        """
        a, b, c = mt.tait_constants(params)
        Pth=self.__relative_thermal_pressure(temperature,params)

        ksi_over_ksi_0=einstein.heat_capacity_v( temperature, params['T_einstein'], params['n'] )/einstein.heat_capacity_v( params['T_0'], params['T_einstein'], params['n'] )

        dSdT=params['V_0']*params['K_0']*np.power((ksi_over_ksi_0*params['a_0']),2.0)*(np.power((1.+b*(pressure-params['P_0']-Pth)), -1.-c) - np.power((1.+b*(-Pth)), -1.-c))

        # Add order-disorder terms if required
        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
            Cpdisord=heat_capacity_p_disorder_Landau(pressure, temperature, params)
        else:
            Cpdisord=0.0

        return self.heat_capacity_p0(temperature,params) + temperature*dSdT + Cpdisord
Example #4
0
    def entropy(self,pressure,temperature, volume, params):
        """
        Returns the entropy [J/K/mol] as a function of pressure [Pa]
        and temperature [K].
        """
        a, b, c = mt.tait_constants(params)
        Pth=self.__relative_thermal_pressure(temperature,params)

        ksi_over_ksi_0=einstein.heat_capacity_v( temperature, params['T_einstein'], params['n'] )/einstein.heat_capacity_v( params['T_0'], params['T_einstein'], params['n'] )

        dintVdpdx=(params['V_0']*params['a_0']*params['K_0']*a*ksi_over_ksi_0)*(np.power((1.+b*(pressure-params['P_0']-Pth)), 0.-c) - np.power((1.-b*Pth), 0.-c))

        # Add order-disorder terms if required
        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
            Sdisord=entropy_disorder_Landau(pressure, temperature, params)
        else:
            if params.has_key('BW_deltaH'): # Add Bragg-Williams disordering
                Sdisord=entropy_disorder_BW(pressure, temperature, params) - entropy_disorder_BW(params['P_0'], params['T_0'], params)
            else:
                Sdisord=0.0

        return params['S_0'] + self.__intCpoverTdT(temperature, params) + dintVdpdx + Sdisord