surfinpy.p_vs_t¶
Functions related to the generation of surface phase diagrams as a function of pressure and temperature. An explanation of theory can be found here <theory.html>
-
surfinpy.p_vs_t.
adsorption_energy
(data, stoich, adsorbant_t)[source]¶ From the dft data provided - calculate the adsorbation energy of a species at the surface.
Parameters: - data (list) – list of dictionaries containing info about each calculation
- stoich (dict) – info about the stoichiometric surface calculation
- adsorbant_t (array like) – dft energy of adsorbing species as a function of temperature
Returns: AE – Adsorbtion energy of adsorbing species in each calculation as a function of temperature
Return type: array like
-
surfinpy.p_vs_t.
calculate
(stoich, data, SE, adsorbant, thermochem, coverage=None)[source]¶ Collects input variables and intitialises the calculation.
Parameters: - stoich (dictionary) – information about the stoichiometric surface
- data (list) – list of dictionaries containing information on the “adsorbed” surfaces
- SE (float) – surface energy of the stoichiomteric surface
- adsorbant (float) – dft energy of adsorbing species
- coverage (array like (default None)) – Numpy array containing the different coverages of adsorbant.
- thermochem (array like) – Numpy array containing thermochemcial data downloaded from NIST_JANAF for the adsorbing species.
Returns: system – plotting object
Return type: class object
-
surfinpy.p_vs_t.
calculate_adsorption_energy
(adsorbed_energy, slab_energy, n_species, adsorbant_t)[source]¶ Calculates the adsorption energy in units of eV
Parameters: - adsorbed_energy (float) – slab energy of slab and adsorbed species from DFT
- slab_energy (float) – bare slab energy from DFT
- n_species (int) – number of adsorbed species at the surface
- adsorbant_t (array like) – dft energy of adsorbing species as a function of temperature
Returns: adsorption energy as a function of temperature
Return type: array like
-
surfinpy.p_vs_t.
calculate_surface_energy
(AE, lnP, T, coverage, SE, nsurfaces)[source]¶ Calculates the surface energy as a function of pressure and temperature for each surface system according to
\[\gamma_{adsorbed, T, p} = \gamma_{bare} + (C(E_{ads, T} - RTln(\frac{p}{p^o})\]where \(\gamma_{adsorbed, T, p}\) is the surface energy of the surface with adsorbed species at a given temperature and pressure, \(\gamma_{bare}\) is the suface energy of the bare surface, C is the coverage of adsorbed species, \(E_{ads, T}\) is the adsorption energy, R is the gas constant, T is the temperature, and \(\frac{p}{p^o}\) is the partial pressure.
Parameters: - AE (list) – list of adsorption energies
- lnP (array like) – full pressure range
- T (array like) – full temperature range
- coverage (array like) – surface coverage of adsorbing species in each calculation
- SE (float) – surface energy of stoichiomteric surface
- data (list) – list of dictionaries containing info on each surface
- nsurfaces (int) – total number of surface
Returns: SE_array – array of integers corresponding to lowest surface energies
Return type: array like
-
surfinpy.p_vs_t.
convert_adsorption_energy_units
(AE)[source]¶ Converts the adsorption energy into units of KJ/mol
Parameters: AE (array like) – array of adsorption energies Returns: array of adsorption energies in units of KJ/mol Return type: array like
-
surfinpy.p_vs_t.
inititalise
(thermochem, adsorbant)[source]¶ Builds the numpy arrays for each calculation.
Parameters: - thermochem (array like) – array containing NIST_JANAF thermochemical data
- adsorbant (float) – dft energy of adsorbing species
Returns: - lnP (array like) – numpy array of pressure values
- logP (array like) – log of lnP (hard coded range -13 - 5.0)
- T (array like) – array of temperature values (hard coded range 2 - 1000 K)
- adsrobant_t (array like) – dft values of adsorbant scaled to temperature